Web Apps - Update Diagnostic Logs Config

Description for Updates the logging configuration of an app.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs?api-version=2024-04-01

URI Parameters

Name In Required Type Description
name
path True

string

Name of the app.

resourceGroupName
path True

string

Name of the resource group to which the resource belongs.

Regex pattern: ^[-\w\._\(\)]+[^\.]$

subscriptionId
path True

string

Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).

api-version
query True

string

API Version

Request Body

Name Type Description
kind

string

Kind of resource.

properties.applicationLogs

ApplicationLogsConfig

Application logs configuration.

properties.detailedErrorMessages

EnabledConfig

Detailed error messages configuration.

properties.failedRequestsTracing

EnabledConfig

Failed requests tracing configuration.

properties.httpLogs

HttpLogsConfig

HTTP logs configuration.

Responses

Name Type Description
200 OK

SiteLogsConfig

OK

Other Status Codes

DefaultErrorResponse

App Service error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Definitions

Name Description
ApplicationLogsConfig

Application logs configuration.

AzureBlobStorageApplicationLogsConfig

Application logs azure blob storage configuration.

AzureBlobStorageHttpLogsConfig

Http logs to azure blob storage configuration.

AzureTableStorageApplicationLogsConfig

Application logs to Azure table storage configuration.

DefaultErrorResponse

App Service error response.

Details
EnabledConfig

Enabled configuration.

Error

Error model.

FileSystemApplicationLogsConfig

Application logs to file system configuration.

FileSystemHttpLogsConfig

Http logs to file system configuration.

HttpLogsConfig

Http logs configuration.

LogLevel

Log level.

SiteLogsConfig

Configuration of App Service site logs.

ApplicationLogsConfig

Application logs configuration.

Name Type Description
azureBlobStorage

AzureBlobStorageApplicationLogsConfig

Application logs to blob storage configuration.

azureTableStorage

AzureTableStorageApplicationLogsConfig

Application logs to azure table storage configuration.

fileSystem

FileSystemApplicationLogsConfig

Application logs to file system configuration.

AzureBlobStorageApplicationLogsConfig

Application logs azure blob storage configuration.

Name Type Description
level

LogLevel

Log level.

retentionInDays

integer

Retention in days. Remove blobs older than X days. 0 or lower means no retention.

sasUrl

string

SAS url to a azure blob container with read/write/list/delete permissions.

AzureBlobStorageHttpLogsConfig

Http logs to azure blob storage configuration.

Name Type Description
enabled

boolean

True if configuration is enabled, false if it is disabled and null if configuration is not set.

retentionInDays

integer

Retention in days. Remove blobs older than X days. 0 or lower means no retention.

sasUrl

string

SAS url to a azure blob container with read/write/list/delete permissions.

AzureTableStorageApplicationLogsConfig

Application logs to Azure table storage configuration.

Name Type Description
level

LogLevel

Log level.

sasUrl

string

SAS URL to an Azure table with add/query/delete permissions.

DefaultErrorResponse

App Service error response.

Name Type Description
error

Error

Error model.

Details

Name Type Description
code

string

Standardized string to programmatically identify the error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

EnabledConfig

Enabled configuration.

Name Type Description
enabled

boolean

True if configuration is enabled, false if it is disabled and null if configuration is not set.

Error

Error model.

Name Type Description
code

string

Standardized string to programmatically identify the error.

details

Details[]

Detailed errors.

innererror

string

More information to debug error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

FileSystemApplicationLogsConfig

Application logs to file system configuration.

Name Type Default value Description
level

LogLevel

Off

Log level.

FileSystemHttpLogsConfig

Http logs to file system configuration.

Name Type Description
enabled

boolean

True if configuration is enabled, false if it is disabled and null if configuration is not set.

retentionInDays

integer

Retention in days. Remove files older than X days. 0 or lower means no retention.

retentionInMb

integer

Maximum size in megabytes that http log files can use. When reached old log files will be removed to make space for new ones. Value can range between 25 and 100.

HttpLogsConfig

Http logs configuration.

Name Type Description
azureBlobStorage

AzureBlobStorageHttpLogsConfig

Http logs to azure blob storage configuration.

fileSystem

FileSystemHttpLogsConfig

Http logs to file system configuration.

LogLevel

Log level.

Name Type Description
Error

string

Information

string

Off

string

Verbose

string

Warning

string

SiteLogsConfig

Configuration of App Service site logs.

Name Type Description
id

string

Resource Id.

kind

string

Kind of resource.

name

string

Resource Name.

properties.applicationLogs

ApplicationLogsConfig

Application logs configuration.

properties.detailedErrorMessages

EnabledConfig

Detailed error messages configuration.

properties.failedRequestsTracing

EnabledConfig

Failed requests tracing configuration.

properties.httpLogs

HttpLogsConfig

HTTP logs configuration.

type

string

Resource type.