PostSharp.ILAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​Backends.​SerilogSerilog­Sink­Configuration­ExtensionsPost­Sharp
Open sandboxFocus

SerilogSinkConfigurationExtensions.PostSharp Method

PostSharp(LoggerSinkConfiguration, String, SerilogParameterHandling)

Returns the same configuration, except with the Serilog-to-PostSharp sink as an additional sink.

Declaration
public static LoggerConfiguration PostSharp(this LoggerSinkConfiguration sinkConfiguration, string defaultLogSourceName = null, SerilogParameterHandling parameterHandling)
Parameters
Type Name Description
Serilog.Configuration.LoggerSinkConfiguration sinkConfiguration

The configuration the sink should be added to.

String defaultLogSourceName

Log source name that will be passed to the PostSharp backend for loggers where Serilog.ILogger.ForContext(System.Type) is not used. Optional.

SerilogParameterHandling parameterHandling

Determines how should Serilog parameters in Serilog messages be passed to PostSharp logging.

Returns
Type Description
Serilog.LoggerConfiguration