Enabled | Whether request logging is enabled. | bool | false |
IncludeQueryParams | Whether to include query parameters in the logs. If disabled, these will be stripped from the request URLs logged. | bool | true |
IncludeRequestHeaders | Whether to include request headers in the logs. Default masking for common sensitive headers (e.g. Authorization) applies. | bool | false |
IncludeRequestBody | Whether to include the request body in the logs. Only JSON and text are supported, up to 50 KB. | bool | false |
IncludeResponseHeaders | Whether to include response headers in the logs. | bool | true |
IncludeResponseBody | Whether to include the response body in the logs. Only JSON and text are supported, up to 50 KB. | bool | false |
IncludeException | Whether to include exception details in the logs. | bool | true |
CaptureLogs | Whether to capture application logs emitted during request handling. | bool | false |
QueryParamMaskPatterns | List of regular expressions for matching query parameters to mask. These are in addition to the default masking patterns. | List<string> | [] |
HeaderMaskPatterns | List of regular expressions for matching headers to mask. These are in addition to the default masking patterns. | List<string> | [] |
BodyFieldMaskPatterns | List of regular expressions for matching request/response body fields to mask. These are in addition to the default masking patterns. | List<string> | [] |
PathExcludePatterns | List of regular expressions for matching paths to exclude from logging. | List<string> | [] |
MaskRequestBody | Function to mask sensitive data in the request body. Return null to mask the whole body. | Func<Request, byte[]?> | - |
MaskResponseBody | Function to mask sensitive data in the response body. Return null to mask the whole body. | Func<Request, Response, byte[]?> | - |
ShouldExclude | Function to determine whether a request should be excluded from logging. Return true to exclude the request. | Func<Request, Response, bool> | - |