W3CLoggingFields Enum (Microsoft.AspNetCore.HttpLogging) (original) (raw)

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 v6.0.36

Package:

Microsoft.AspNetCore.App.Ref v7.0.5

Package:

Microsoft.AspNetCore.App.Ref v8.0.19

Package:

Microsoft.AspNetCore.App.Ref v9.0.8

Source:

W3CLoggingFields.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.

Flags used to control which parts of the request and response are logged in W3C format.

This enumeration supports a bitwise combination of its member values.

[System.Flags]
public enum W3CLoggingFields
[<System.Flags>]
type W3CLoggingFields = 
Public Enum W3CLoggingFields

Inheritance

Attributes

Fields

Name Value Description
None 0 No logging.
Date 1 Flag for logging the date that the activity occurred.
Time 2 Flag for logging the time that the activity occurred.
ClientIpAddress 4 Flag for logging the IP address of the client that accessed the server.
UserName 8 Flag for logging the name of the authenticated user that accessed the server. UserName contents can contain private information which may have regulatory concerns under GDPR and other laws. UserName should not be logged unless logs are secure and access controlled and the privacy impact assessed.
ServerName 16 Flag for logging the name of the server on which the log entry was generated.
ServerIpAddress 32 Flag for logging the IP address of the server on which the log entry was generated.
ServerPort 64 Flag for logging the port number the client is connected to.
ConnectionInfoFields 100 Flag for logging properties that are part of the ConnectionInfoIncludes ClientIpAddress, ServerIpAddress and ServerPort.
Method 128 Flag for logging the action the client was trying to perform.
UriStem 256 Flag for logging the resource accessed.
UriQuery 512 Flag for logging the query, if any, the client was trying to perform.
ProtocolStatus 1024 Flag for logging the HTTP response status code.
TimeTaken 2048 Flag for logging the duration of time, in milliseconds, that the action consumed.
ProtocolVersion 4096 Flag for logging the protocol (HTTP, FTP) version used by the client. For HTTP this will be either HTTP 1.0 or HTTP 1.1.
Host 8192 Flag for logging the content of the host header.
UserAgent 16384 Flag for logging the requesting user agent.
Cookie 32768 Flag for logging the content of the cookie sent by the client, if any. Cookie contents can contain authentication tokens, or private information which may have regulatory concerns under GDPR and other laws. Cookies should not be logged unless logs are secure and access controlled and the privacy impact assessed.
Referer 65536 Flag for logging the previous site visited by the user, which provided a link to the current site, if any.
RequestHeaders 90112 Flag for logging properties that are part of the HeadersIncludes Host, Referer, and UserAgent.
Request 95104 Flag for logging properties that are part of the HttpRequestIncludes UriStem, UriQuery, ProtocolVersion,Method, Host, Referer, and UserAgent.
All 131071 Flag for logging all possible fields. Includes Date, Time, ClientIpAddress,ServerName, ServerIpAddress, ServerPort,Method, UriStem, UriQuery,ProtocolStatus, TimeTaken, ProtocolVersion,Host, UserAgent, Referer,UserName, and Cookie.

Applies to