你当前正在访问 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、缓存控制、连接、内容长度、内容类型、日期、ETag、过期、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、缓存控制、连接、内容长度、内容类型、日期、ETag、过期、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

属性值