Class SerilogLoggingBuilderExtensions
- Namespace
- Steeltoe.Extensions.Logging.DynamicSerilog
- Assembly
- Steeltoe.Extensions.Logging.DynamicSerilogBase.dll
public static class SerilogLoggingBuilderExtensions
- Inheritance
-
SerilogLoggingBuilderExtensions
- Inherited Members
Methods
AddDynamicSerilog(ILoggingBuilder, LoggerConfiguration, bool)
public static ILoggingBuilder AddDynamicSerilog(this ILoggingBuilder builder, LoggerConfiguration serilogConfiguration, bool preserveDefaultConsole = false)
Parameters
builder
ILoggingBuilderserilogConfiguration
LoggerConfigurationpreserveDefaultConsole
bool
Returns
AddDynamicSerilog(ILoggingBuilder, LoggerConfiguration, bool, bool)
Add Serilog, wrapped in a IDynamicLoggerProvider that supports
dynamically controlling the minimum log level via management endpoints. Will add a Console sink if loggerConfiguration
is not provided.
[Obsolete("Please use a different overload of AddDynamicSerilog ")]
public static ILoggingBuilder AddDynamicSerilog(this ILoggingBuilder builder, LoggerConfiguration loggerConfiguration, bool preserveStaticLogger, bool preserveDefaultConsole = false)
Parameters
builder
ILoggingBuilderThe ILoggingBuilder for configuring the LoggerFactory
loggerConfiguration
LoggerConfigurationAn initial LoggerConfiguration
preserveStaticLogger
boolNot supported!
preserveDefaultConsole
boolWhen true, do not remove Microsoft's ConsoleLoggerProvider
Returns
- ILoggingBuilder
The configured ILoggingBuilder
AddDynamicSerilog(ILoggingBuilder, bool)
Add Serilog with Console sink, wrapped in a IDynamicLoggerProvider that supports dynamically controlling the minimum log level via management endpoints
public static ILoggingBuilder AddDynamicSerilog(this ILoggingBuilder builder, bool preserveDefaultConsole = false)
Parameters
builder
ILoggingBuilderThe ILoggingBuilder for configuring the LoggerFactory
preserveDefaultConsole
boolWhen true, do not remove Microsoft's ConsoleLoggerProvider
Returns
- ILoggingBuilder
The configured ILoggingBuilder
AddSerilogDynamicConsole(ILoggingBuilder)
Add Steeltoe logger wrapped in a IDynamicLoggerProvider that supports dynamically controlling the minimum log level via management endpoints
[Obsolete("Please use AddDynamicSerilog instead")]
public static ILoggingBuilder AddSerilogDynamicConsole(this ILoggingBuilder builder)
Parameters
builder
ILoggingBuilderThe ILoggingBuilder for configuring the LoggerFactory
Returns
- ILoggingBuilder
The configured ILoggingBuilder
AddSerilogDynamicConsole(ILoggingBuilder, LoggerConfiguration, bool)
Add Steeltoe logger wrapped in a IDynamicLoggerProvider that supports dynamically controlling the minimum log level via management endpoints
[Obsolete("Please use AddDynamicSerilog instead")]
public static ILoggingBuilder AddSerilogDynamicConsole(this ILoggingBuilder builder, LoggerConfiguration loggerConfiguration, bool preserveStaticLogger = false)
Parameters
builder
ILoggingBuilderThe ILoggingBuilder for configuring the LoggerFactory
loggerConfiguration
LoggerConfigurationAn initial LoggerConfiguration
preserveStaticLogger
boolIndicates whether to preserve the value of Logger.
Returns
- ILoggingBuilder
The configured ILoggingBuilder