CommonAccessLogOptions class
Options controlling the behaviour of the CommonAccessLogMiddleware.
public sealed class CommonAccessLogOptions
Public Members
| name | description |
|---|---|
| CommonAccessLogOptions() | The default constructor. |
| ClientAddressHeader { get; set; } | Gets or sets the name of the HTTP header that should be consulted for the client address (for example X-Forwarded-For). When the header is missing the connection remote address is used. |
| IncludeElapsedMilliseconds { get; set; } | Gets or sets a value indicating whether the elapsed request time in milliseconds should be appended to the log entry. |
| IncludeProtocol { get; set; } | Gets or sets a value indicating whether the request protocol should be included in the request line. |
| IncludeQueryString { get; set; } | Gets or sets a value indicating whether the request query string should be included in the request line. |
| Level { get; set; } | Gets or sets the log level used when writing access log entries. |
| Logger { get; set; } | Gets or sets the Serilog logger used to emit access log entries. When not specified the middleware will use the application logger registered in dependency injection. |
| TimeProvider { get; set; } | Gets or sets the time provider used when rendering timestamps. |
| TimestampFormat { get; set; } | Gets or sets the timestamp format used when rendering the access log entry. |
| UseUtcTimestamp { get; set; } | Gets or sets a value indicating whether the timestamp should be written using UTC time rather than the server local time. |
| const DefaultTimestampFormat | The default timestamp format used by Apache HTTPD common/combined logs. |
See Also
- namespace Kestrun.Middleware