Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

HttpLoggingAttribute Class

Definition

Namespace:
Microsoft.AspNetCore.HttpLogging
Assembly:
Microsoft.AspNetCore.HttpLogging.dll
Package:
Microsoft.AspNetCore.App.Ref v10.0.0
Package:
Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.App.Ref v8.0.19
Package:
Microsoft.AspNetCore.App.Ref v9.0.8
Source:
HttpLoggingAttribute.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Metadata that provides endpoint-specific settings for the HttpLogging middleware.

[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
Inheritance
HttpLoggingAttribute
Attributes

Constructors

Name Description
HttpLoggingAttribute(HttpLoggingFields)

Initializes an instance of the HttpLoggingAttribute class.

Properties

Name Description
IsRequestBodyLogLimitSet

Indicates whether RequestBodyLogLimit has been set.

IsResponseBodyLogLimitSet

Indicates whether ResponseBodyLogLimit has been set.

LoggingFields

Specifies what fields to log.

RequestBodyLogLimit

Specifies the maximum number of bytes to be logged for the request body.

ResponseBodyLogLimit

Specifies the maximum number of bytes to be logged for the response body.

Applies to


Feedback

Was this page helpful?