Class ApplicationRequestLoggingOptions
- Namespace
- ProjectTemplate.Web.Options
- Assembly
- ProjectTemplate.Web.dll
Options controlling structured HTTP request logging behavior.
public sealed class ApplicationRequestLoggingOptions
- Inheritance
-
ApplicationRequestLoggingOptions
- Inherited Members
Fields
SectionName
Gets the configuration section name used to bind request logging settings.
public const string SectionName = "ProjectTemplate:RequestLogging"
Field Value
Properties
CorrelationHeaderName
Gets or sets the request/response header used for request correlation.
public string CorrelationHeaderName { get; set; }
Property Value
Enabled
Gets or sets a value indicating whether structured request logging is enabled.
public bool Enabled { get; set; }
Property Value
ExcludedPathPrefixes
Gets or sets path prefixes that should be excluded from normal request logging. Matching requests are logged at Verbose level so the default sinks suppress them.
public List<string> ExcludedPathPrefixes { get; set; }
Property Value
Remarks
A configured list replaces these defaults rather than extending them. A blank configured entry is ignored, so a later configuration source can remove an inherited entry by overriding its index with an empty value.
IncludeQueryString
Gets or sets a value indicating whether the query string should be logged. Disabled by default because query strings may contain sensitive values.
public bool IncludeQueryString { get; set; }
Property Value
IncludeRemoteIpAddress
Gets or sets a value indicating whether the remote IP address should be logged.
public bool IncludeRemoteIpAddress { get; set; }
Property Value
Remarks
Disabled by default for the same reason as IncludeUserName. A client IP address is treated as personal data under several privacy regimes. Enable this when incident response or abuse handling needs it, and note that the value is only meaningful once forwarded headers are configured with trusted proxies.
IncludeUserName
Gets or sets a value indicating whether authenticated user names should be logged.
public bool IncludeUserName { get; set; }
Property Value
Remarks
Disabled by default. A user name identifies a person, and request logs are typically shipped and retained for longer than the data they describe. Enable this when the application has decided that request attribution is needed and its log retention accounts for personal data.