你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Web Apps - Update Diagnostic Logs Config Slot

有关汇报应用的日志记录配置的说明。

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

URI 参数

名称 必需 类型 说明
name
path True

string

应用的名称。

resourceGroupName
path True

string

资源所属的资源组的名称。

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

slot
path True

string

部署槽的名称。 如果未指定槽,API 将更新生产槽的日志记录配置。

subscriptionId
path True

string

Azure 订阅 ID。 这是 GUID 格式的字符串 (例如 00000000-0000-0000-0000-0000-0000000000000) 。

api-version
query True

string

API 版本

请求正文

名称 类型 说明
kind

string

资源类型。

properties.applicationLogs

ApplicationLogsConfig

应用程序日志配置。

properties.detailedErrorMessages

EnabledConfig

详细的错误消息配置。

properties.failedRequestsTracing

EnabledConfig

失败的请求跟踪配置。

properties.httpLogs

HttpLogsConfig

HTTP 日志配置。

响应

名称 类型 说明
200 OK

SiteLogsConfig

确定

Other Status Codes

DefaultErrorResponse

App 服务错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

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

Scopes

名称 说明
user_impersonation 模拟用户帐户

定义

名称 说明
ApplicationLogsConfig

应用程序日志配置。

AzureBlobStorageApplicationLogsConfig

应用程序记录 azure Blob 存储配置。

AzureBlobStorageHttpLogsConfig

Http 日志到 Azure Blob 存储配置。

AzureTableStorageApplicationLogsConfig

应用程序日志到 Azure 表存储配置。

DefaultErrorResponse

App 服务错误响应。

Details
EnabledConfig

已启用配置。

Error

错误模型。

FileSystemApplicationLogsConfig

应用程序将日志记录到文件系统配置。

FileSystemHttpLogsConfig

Http 记录到文件系统配置。

HttpLogsConfig

Http 日志配置。

LogLevel

日志级别。

SiteLogsConfig

配置App 服务站点日志。

ApplicationLogsConfig

应用程序日志配置。

名称 类型 说明
azureBlobStorage

AzureBlobStorageApplicationLogsConfig

应用程序日志到 Blob 存储配置。

azureTableStorage

AzureTableStorageApplicationLogsConfig

应用程序将日志记录到 azure 表存储配置。

fileSystem

FileSystemApplicationLogsConfig

应用程序将日志记录到文件系统配置。

AzureBlobStorageApplicationLogsConfig

应用程序记录 azure Blob 存储配置。

名称 类型 说明
level

LogLevel

日志级别。

retentionInDays

integer

以天为单位的保留期。 删除早于 X 天的 Blob。 0 或更低表示不保留。

sasUrl

string

具有读取/写入/列出/删除权限的 Azure Blob 容器的 SAS URL。

AzureBlobStorageHttpLogsConfig

Http 日志到 Azure Blob 存储配置。

名称 类型 说明
enabled

boolean

如果配置已启用,则为 True;如果禁用配置,则为 false;如果未设置配置,则为 null。

retentionInDays

integer

以天为单位的保留期。 删除早于 X 天的 Blob。 0 或更低表示不保留。

sasUrl

string

具有读取/写入/列出/删除权限的 Azure Blob 容器的 SAS URL。

AzureTableStorageApplicationLogsConfig

应用程序日志到 Azure 表存储配置。

名称 类型 说明
level

LogLevel

日志级别。

sasUrl

string

具有添加/查询/删除权限的 Azure 表的 SAS URL。

DefaultErrorResponse

App 服务错误响应。

名称 类型 说明
error

Error

错误模型。

Details

名称 类型 说明
code

string

用于以编程方式识别错误的标准化字符串。

message

string

详细的错误说明和调试信息。

target

string

详细的错误说明和调试信息。

EnabledConfig

已启用配置。

名称 类型 说明
enabled

boolean

如果配置已启用,则为 True;如果禁用配置,则为 false;如果未设置配置,则为 null。

Error

错误模型。

名称 类型 说明
code

string

用于以编程方式识别错误的标准化字符串。

details

Details[]

详细错误。

innererror

string

调试错误的详细信息。

message

string

详细的错误说明和调试信息。

target

string

详细的错误说明和调试信息。

FileSystemApplicationLogsConfig

应用程序将日志记录到文件系统配置。

名称 类型 默认值 说明
level

LogLevel

Off

日志级别。

FileSystemHttpLogsConfig

Http 记录到文件系统配置。

名称 类型 说明
enabled

boolean

如果配置已启用,则为 True;如果禁用配置,则为 false;如果未设置配置,则为 null。

retentionInDays

integer

以天为单位的保留期。 删除早于 X 天的文件。 0 或更低表示不保留。

retentionInMb

integer

http 日志文件可以使用的最大大小(以 MB 为单位)。 到达时,将删除旧日志文件,以便为新日志文件提供空间。 值的范围可以是 25 到 100。

HttpLogsConfig

Http 日志配置。

名称 类型 说明
azureBlobStorage

AzureBlobStorageHttpLogsConfig

Http 日志到 Azure Blob 存储配置。

fileSystem

FileSystemHttpLogsConfig

Http 记录到文件系统配置。

LogLevel

日志级别。

名称 类型 说明
Error

string

Information

string

Off

string

Verbose

string

Warning

string

SiteLogsConfig

配置App 服务站点日志。

名称 类型 说明
id

string

资源 ID。

kind

string

资源类型。

name

string

资源名称。

properties.applicationLogs

ApplicationLogsConfig

应用程序日志配置。

properties.detailedErrorMessages

EnabledConfig

详细的错误消息配置。

properties.failedRequestsTracing

EnabledConfig

失败的请求跟踪配置。

properties.httpLogs

HttpLogsConfig

HTTP 日志配置。

type

string

资源类型。