Open sandboxFocus

Method PostSharp

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 = SerilogParameterHandling.Default)
Parameters
Type Name Description
LoggerSinkConfiguration sinkConfiguration

The configuration the sink should be added to.

string defaultLogSourceName

The log source name that is passed to the PostSharp backend for loggers where ForContext(Type) is not used. This parameter is optional.

SerilogParameterHandling parameterHandling

Specifies how Serilog parameters in Serilog messages are passed to PostSharp logging.

Returns
Type Description
LoggerConfiguration