Open sandboxFocus

Class PostSharpLoggingHttpModule

An IHttpModule that defines a PostSharp Logging activity (and possibly a transaction) for incoming HTTP requests. This module can be added as such to web.config. It can also be derived in a custom class, which allows to override the LogEventMetadata. The default implementation is AspNetFrameworkRequestMetadata.

Inheritance
PostSharpLoggingHttpModule
Implements
Namespace: PostSharp.Patterns.Diagnostics.Adapters.AspNetFramework
Assembly: PostSharp.Patterns.Diagnostics.Adapters.AspNetFramework.dll
Syntax
public class PostSharpLoggingHttpModule : IHttpModule

Constructors

Name Description
PostSharpLoggingHttpModule()

Initializes a new PostSharpLoggingHttpModule with the default AspNetFrameworkRequestMetadata.

PostSharpLoggingHttpModule(LogEventMetadata, Predicate<Uri>, ICorrelationProtocol)

Initializes a new PostSharpLoggingHttpModule and specifies a custom LogEventMetadata.

Properties

Name Description
CorrelationProtocol

Gets or sets the implementation of ICorrelationProtocol to support distributed logging and interpret incoming request headers.

RequestFilter

Gets or sets a predicate that determines whether a specific request should be logged. The default implementation filters out the following paths: /js, /css, /lib, /scripts, /content, /favicon.