Logging back-end for Serilog.
Implements
Namespace: PostSharp.Patterns.Diagnostics.Backends.Serilog
Assembly: PostSharp.Patterns.Diagnostics.Backends.Serilog.dll
Syntax
public class SerilogLoggingBackend : TextLoggingBackend, IDisposable
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. |