PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Adapters.​Asp­Net­Framework Namespace / Post­Sharp­Logging­Http­Module Class / Post­Sharp­Logging­Http­Module Constructor / Post­Sharp­Logging­Http­Module Constructor (Log­Event­Metadata, Predicate(Uri), ICorrelation­Protocol)

PostSharpLoggingHttpModule Constructor (LogEventMetadata, Predicate<Uri>, ICorrelationProtocol)

Initializes a new PostSharpLoggingHttpModule and specifies a custom LogEventMetadata.

Namespace:  PostSharp.Patterns.Diagnostics.Adapters.AspNetFramework
Assembly:  PostSharp.Patterns.Diagnostics.Adapters.AspNetFramework (in PostSharp.Patterns.Diagnostics.Adapters.AspNetFramework.dll) Version: 2023.0.3.0 (2023.0.3.0)
protected PostSharpLoggingHttpModule(
	LogEventMetadata metadata = null,
	Predicate<Uri> requestFilter = null,
	ICorrelationProtocol correlationProtocol = null


metadata (Optional)
Type: PostSharp.Patterns.Diagnostics.Custom.LogEventMetadata
>An optional LogEventMetadata, which maps an HttpContext on a set of properties and an expression model. The default implementation is AspNetFrameworkRequestMetadata. You can derive this class if you want to add or remove properties. If you want to change the expression model, you have to derive the generic abstract AspNetFrameworkRequestMetadata<T>.
requestFilter (Optional)
Type: System.Predicate<Uri>
An optional predicate that determines whether a specific request should be logged. If this parameter is null, the value of RequestFilter will be used (this property will be evaluated for each request).
correlationProtocol (Optional)
Type: PostSharp.Patterns.Diagnostics.Correlation.ICorrelationProtocol
An optional implementation of ICorrelationProtocol to support distributed logging and interpret incoming request headers. If this parameter is null, the value of the CorrelationProtocol static property will be used (this property will be evaluated for each request).
See Also