C# Класс AccidentalFish.ApplicationSupport.Logging.Serilog.IDependencyResolverExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

UseSerilog() публичный статический Метод

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
Результат IDependencyResolver