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

LogPolicyOptions interface

传递给 logPolicy 的选项。 默认情况下,仅记录一组标头列表,但可以对此进行配置。 从不记录请求和响应正文。

属性

allowedHeaderNames

启用日志记录时将记录其值的标头名称。 默认为:x-ms-client-request-id、x-ms-return-client-request-id、x-ms-useragent、x-ms-correlation-request-id、 x-ms-request-id、client-request-id、ms-cv、return-client-request-id、traceparent、Access-Control-Allow-Credentials、Access-Control-Allow-Headers、Access-Control-Allow-Methods、Access-Control-Allow-Origin、Access-Control-Expose-Headers、Access-Control-Max-Age、Access-Control-Request-Headers、Access-Control-Request-Method、Origin、Accept、Accept-Encoding、Cache-control、Connection、content-Length、content-type、Date、ETag、Expires、If-Match、If-modified-Since、If-None-match、if-unmodified-Since、Last-Modified、Pragma、Request-Id、Retry-After、Server、Transfer-Encoding 和 User-Agent。

此字段中指定的任何标头都将添加到该列表中。 任何其他值都将作为“REDACTED”写入日志。

allowedQueryParameters

查询字符串名称,在启用日志记录时将记录其值。 默认情况下,不会记录任何查询字符串值。

logger

调试器 (记录器) 实例,用于写入管道日志。

属性详细信息

allowedHeaderNames

启用日志记录时将记录其值的标头名称。 默认为:x-ms-client-request-id、x-ms-return-client-request-id、x-ms-useragent、x-ms-correlation-request-id、 x-ms-request-id、client-request-id、ms-cv、return-client-request-id、traceparent、Access-Control-Allow-Credentials、Access-Control-Allow-Headers、Access-Control-Allow-Methods、Access-Control-Allow-Origin、Access-Control-Expose-Headers、Access-Control-Max-Age、Access-Control-Request-Headers、Access-Control-Request-Method、Origin、Accept、Accept-Encoding、Cache-control、Connection、content-Length、content-type、Date、ETag、Expires、If-Match、If-modified-Since、If-None-match、if-unmodified-Since、Last-Modified、Pragma、Request-Id、Retry-After、Server、Transfer-Encoding 和 User-Agent。

此字段中指定的任何标头都将添加到该列表中。 任何其他值都将作为“REDACTED”写入日志。

allowedHeaderNames?: string[]

属性值

string[]

allowedQueryParameters

查询字符串名称,在启用日志记录时将记录其值。 默认情况下,不会记录任何查询字符串值。

allowedQueryParameters?: string[]

属性值

string[]

logger

调试器 (记录器) 实例,用于写入管道日志。

logger?: Debugger

属性值