PostSharpAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​Backends.​SerilogSerilog­Logging­Backend
Open sandboxFocus

SerilogLoggingBackend Class

Logging back-end for Serilog.

Inheritance
System.Object
SerilogLoggingBackend
Implements
IDisposable
Namespace: PostSharp.Patterns.Diagnostics.Backends.Serilog
Assembly: PostSharp.Patterns.Diagnostics.Backends.Serilog.dll
Syntax
public class SerilogLoggingBackend : TextLoggingBackend

Constructors

Name Description
SerilogLoggingBackend()

Initializes a new SerilogLoggingBackend and uses the globally-shared Serilog.ILogger.

SerilogLoggingBackend(ILogger)

Initializes a new SerilogLoggingBackend and specifies the target Serilog.ILogger.

Properties

Name Description
Logger

Gets the Serilog.ILogger passed to the constructor of the current SerilogLoggingBackend, or the globally-shared Serilog.ILogger if no logger was passed during the instantiation of the current SerilogLoggingBackend.

MessageTemplateCacheSize

Gets the number of items in the message template cache.

Options

Gets the back-end options.

Methods

Name Description
ClearMessageTemplateCache()

Clears the message template cache.

CreateAsyncCustomActivityContext()

Creates a new AsyncCustomActivityLoggingContext.

CreateAsyncMethodContext()

Creates a new AsyncMethodLoggingContext for a given async method.

CreateEphemeralContext(ThreadLoggingContext)

Creates a new EphemeralLoggingContext.

CreateIteratorContext()

Creates a new IteratorLoggingContext for a given iterator method.

CreateRecordBuilder()

Creates a new LogRecordBuilder.

CreateSyncCustomActivityContext(ThreadLoggingContext)

Creates a new SyncCustomActivityLoggingContext.

CreateSyncMethodContext(ThreadLoggingContext)

Creates a new SyncMethodLoggingContext for a given normal (non-async, non-iterator) method.

CreateTypeSource(LoggingNamespaceSource, Type)

Creates a LoggingTypeSource for the given role and type.

CreateTypeSourceBySourceName(LoggingNamespaceSource, String)

Creates a LoggingTypeSource for the given role and logger name.

GetTextBackendOptions()

Gets the options.

Extension Methods

LoggingConfigurationManager.ConfigureFromXmlWithAutoReloadAsync(LoggingBackend, Uri, TimeSpan, CancellationToken)
LoggingConfigurationManager.StopAutoReloadConfigurationAsync(LoggingBackend)
LoggingConfigurationManager.ConfigureFromXmlAsync(LoggingBackend, Uri, CancellationToken)
LoggingConfigurationManager.ConfigureFromXml(LoggingBackend, XDocument, Boolean)
LoggingConfigurationManager.ConfigureFromXml(LoggingBackend, XElement, Boolean)
LoggingConfigurationManager.ResetConfiguration(LoggingBackend)