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
builder
ILoggingBuilderThe ILoggingBuilder to configure.
Returns
- ILoggingBuilder
The incoming
builder
so 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
builder
ILoggingBuilderThe ILoggingBuilder to configure.
serilogConfiguration
LoggerConfigurationEnables to configure Serilog from code instead of configuration.
Returns
- ILoggingBuilder
The incoming
builder
so 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
builder
ILoggingBuilderThe ILoggingBuilder to configure.
serilogConfiguration
LoggerConfigurationEnables to configure Serilog from code instead of configuration.
preserveDefaultConsole
boolWhen set to
true
, does not remove existing logger providers.
Returns
- ILoggingBuilder
The incoming
builder
so 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
builder
ILoggingBuilderThe ILoggingBuilder to configure.
preserveDefaultConsole
boolWhen set to
true
, does not remove existing logger providers.
Returns
- ILoggingBuilder
The incoming
builder
so that additional calls can be chained.