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
Tail
Get-AzureWebsiteLog
[-Path <String>]
[-Message <String>]
[-Tail]
[-Name <String>]
[-Slot <String>]
[-Profile <AzureSMProfile>]
[<CommonParameters>]
ListPath
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 available 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.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
ListPath
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Message
Specifies a string which will be used to filter the log message. Only logs which contains this string will be retrieved.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Tail
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Name
The name of the website.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Path
The path from which the log will be retrieved. By default it is Root, which means include all the paths.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Tail
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | 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.
Parameter properties
Type: | AzureSMProfile |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Slot
Specifies the slot name.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Tail
Specifies whether to stream the logs.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Tail
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.