Open sandboxFocus

Class MicrosoftLoggingCollectingLoggerProvider

An ILoggerProvider that creates loggers that send logging to PostSharp backends as manual log events.

Inheritance
MicrosoftLoggingCollectingLoggerProvider
Namespace: PostSharp.Patterns.Diagnostics.Backends.Microsoft
Assembly: PostSharp.Patterns.Diagnostics.Backends.Microsoft.dll
Syntax
public sealed class MicrosoftLoggingCollectingLoggerProvider : ILoggerProvider, IDisposable
Remarks

Register this provider with the AddPostSharp(ILoggingBuilder) extension method, after you have removed the output providers from the logging builder. Pass those output providers to a MicrosoftLoggingBackend through a separate ILoggerFactory, and set that backend as DefaultBackend. Manual and automatic log records then go through the same backend and share the same indentation.

Constructors

Name Description
MicrosoftLoggingCollectingLoggerProvider()

Initializes a new instance of the MicrosoftLoggingCollectingLoggerProvider class.

Methods

Name Description
CreateLogger(string)

Creates a new logger that sends ASP.NET logging events into PostSharp as manual events, under the given log source name.

Dispose()

Does nothing, because there is nothing to dispose.

See Also