Get-AzureWebsiteLog

Gets logs for the specified website.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.

The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.

Syntax

Get-AzureWebsiteLog
   [-Path <String>]
   [-Message <String>]
   [-Tail]
   [-Name <String>]
   [-Slot <String>]
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]
Get-AzureWebsiteLog
   [-ListPath]
   [-Name <String>]
   [-Slot <String>]
   [-Profile <AzureSMProfile>]
   [<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.

Parameters

-ListPath

Indicates whether to list the log paths.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-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
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Name

The name of the website.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
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
Required:False
Accept pipeline input:True
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Slot

Specifies the slot name.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Tail

Specifies whether to stream the logs.

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False