Open sandboxFocus

Constructor PostSharpLoggingHttpModule

PostSharpLoggingHttpModule()

Initializes a new PostSharpLoggingHttpModule with the default AspNetFrameworkRequestMetadata.

Declaration
public PostSharpLoggingHttpModule()

PostSharpLoggingHttpModule(LogEventMetadata, Predicate<Uri>, ICorrelationProtocol)

Initializes a new PostSharpLoggingHttpModule and specifies a custom LogEventMetadata.

Declaration
protected PostSharpLoggingHttpModule(LogEventMetadata metadata = null, Predicate<Uri> requestFilter = null, ICorrelationProtocol correlationProtocol = null)
Parameters
Type Name Description
LogEventMetadata metadata

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

Predicate<Uri> requestFilter

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

ICorrelationProtocol correlationProtocol

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