C# Class AccidentalFish.ApplicationSupport.Logging.Serilog.IDependencyResolverExtensions

Mostra file Open project: JamesRandall/AccidentalFish.ApplicationSupport

Public Methods

Method Description
UseSerilog ( this dependencyResolver, Func configurationProvider = null, LogLevelEnum defaultMinimumLogLevel = LogLevelEnum.Warning, IFullyQualifiedName defaultLoggerSource = null, string sourceFqnPropertyName = "SourceFqn", string correlationIdPropertyName = "CorrelationId" ) : IDependencyResolver

Register Serilog as the frameworks default logger.

Method Details

UseSerilog() public static method

Register Serilog as the frameworks default logger.
public static UseSerilog ( this dependencyResolver, Func configurationProvider = null, LogLevelEnum defaultMinimumLogLevel = LogLevelEnum.Warning, IFullyQualifiedName defaultLoggerSource = null, string sourceFqnPropertyName = "SourceFqn", string correlationIdPropertyName = "CorrelationId" ) : IDependencyResolver
dependencyResolver this Dependency resolver to register Serilog in
configurationProvider Func A function that returns a SeriLog LoggerConfiguration class. /// If null then Serilog is configured to write using the Trace sink. Note that a LoggerConfiguration returned from this function /// will be further annotated with a minimum log level and property enrichment for correlation ID and source. If you don't want /// any of that then use the CreateSerilog(LoggerConfiguration loggerConfiguration) on ISerilogFactory
defaultMinimumLogLevel LogLevelEnum The default minimum log level for loggers created by the factory
defaultLoggerSource IFullyQualifiedName The component source to use for a logger when no source is specified - defaults to null.
sourceFqnPropertyName string The Serilog property name for the source component fully qualified name
correlationIdPropertyName string The Serilog property name for the correlation ID
return IDependencyResolver