Get-​Azure​Website​Log

Gets logs for the specified website.

Syntax

Get-AzureWebsiteLog
   [-ListPath]
   [-Name <String>]
   [-Profile <AzureSMProfile>]
   [-Slot <String>]
   [<CommonParameters>]
Get-AzureWebsiteLog
   [-Message <String>]
   [-Name <String>]
   [-Path <String>]
   [-Profile <AzureSMProfile>]
   [-Slot <String>]
   [-Tail]
   [<CommonParameters>]

Description

This topic describes the cmdlet in the 0.8.10 version of the Microsoft Azure PowerShell module. To get the version of the module you're using, in the Azure PowerShell console, type (Get-Module -Name Azure).Version.

Gets log for the specified website.

Examples

Example 1: Start log streaming

PS C:\> Get-AzureWebsiteLog -Tail

This example starts log streaming for all application logs.

Example 2: Start log streaming for http logs

PS C:\> Get-AzureWebsiteLog -Tail -Path http

This example starts log streaming for http logs.

Example 3: Start log streaming for error logs

PS C:\> Get-AzureWebsiteLog -Tail -Message Error

This example starts log streaming and show error logs only.

Example 4: Display avaiable logs

PS C:\> Get-AzureWebsiteLog -Name MyWebsite -ListPath

This example lists all available log paths in the website.

Required Parameters

-ListPath

Indicates whether to list the log paths.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Tail

Specifies whether to stream the logs.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Message

Specifies a string which will be used to filter the log message. Only logs which contains this string will be retrieved.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

The name of the website.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Path

The path from which the log will be retrieved. By default it is Root, which means include all the paths.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type:AzureSMProfile
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Slot

Specifies the slot name.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False