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

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

SerilogParameterHandling parameterHandling

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

Returns
Type Description
LoggerConfiguration