Share via


HttpLoggingAttribute 类

定义

为 HttpLogging 中间件提供终结点特定设置的元数据。

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public sealed class HttpLoggingAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type HttpLoggingAttribute = class
    inherit Attribute
Public NotInheritable Class HttpLoggingAttribute
Inherits Attribute
继承
HttpLoggingAttribute
属性

构造函数

HttpLoggingAttribute(HttpLoggingFields)

初始化 HttpLoggingAttribute 类的实例。

属性

IsRequestBodyLogLimitSet

指示是否已 RequestBodyLogLimit 设置。

IsResponseBodyLogLimitSet

指示是否已 ResponseBodyLogLimit 设置。

LoggingFields

指定要记录的字段。

RequestBodyLogLimit

指定要为请求正文记录的最大字节数。

ResponseBodyLogLimit

指定要为响应正文记录的最大字节数。

适用于