Class SerilogLoggingBuilderExtensions
- Namespace
- Steeltoe.Logging.DynamicSerilog
- Assembly
- Steeltoe.Logging.DynamicSerilog.dll
public static class SerilogLoggingBuilderExtensions
- Inheritance
-
SerilogLoggingBuilderExtensions
- Inherited Members
Methods
AddDynamicSerilog(ILoggingBuilder)
Adds Serilog with Console sink, wrapped in a DynamicSerilogLoggerProvider.
public static ILoggingBuilder AddDynamicSerilog(this ILoggingBuilder builder)
Parameters
builderILoggingBuilderThe ILoggingBuilder to configure.
Returns
- ILoggingBuilder
The incoming
builderso that additional calls can be chained.
AddDynamicSerilog(ILoggingBuilder, LoggerConfiguration?)
Adds Serilog with Console sink, wrapped in a DynamicSerilogLoggerProvider.
public static ILoggingBuilder AddDynamicSerilog(this ILoggingBuilder builder, LoggerConfiguration? serilogConfiguration)
Parameters
builderILoggingBuilderThe ILoggingBuilder to configure.
serilogConfigurationLoggerConfigurationEnables to configure Serilog from code instead of configuration.
Returns
- ILoggingBuilder
The incoming
builderso that additional calls can be chained.
AddDynamicSerilog(ILoggingBuilder, LoggerConfiguration?, bool)
Adds Serilog with Console sink, wrapped in a DynamicSerilogLoggerProvider.
public static ILoggingBuilder AddDynamicSerilog(this ILoggingBuilder builder, LoggerConfiguration? serilogConfiguration, bool preserveDefaultConsole)
Parameters
builderILoggingBuilderThe ILoggingBuilder to configure.
serilogConfigurationLoggerConfigurationEnables to configure Serilog from code instead of configuration.
preserveDefaultConsoleboolWhen set to
true, does not remove existing logger providers.
Returns
- ILoggingBuilder
The incoming
builderso that additional calls can be chained.
AddDynamicSerilog(ILoggingBuilder, bool)
Adds Serilog with Console sink, wrapped in a DynamicSerilogLoggerProvider.
public static ILoggingBuilder AddDynamicSerilog(this ILoggingBuilder builder, bool preserveDefaultConsole)
Parameters
builderILoggingBuilderThe ILoggingBuilder to configure.
preserveDefaultConsoleboolWhen set to
true, does not remove existing logger providers.
Returns
- ILoggingBuilder
The incoming
builderso that additional calls can be chained.