Class SerilogLoggingBuilderExtensions
Inheritance
Namespace: Steeltoe.Extensions.Logging.DynamicSerilog
Assembly: Steeltoe.Extensions.Logging.DynamicSerilogBase.dll
Syntax
public static class SerilogLoggingBuilderExtensions : object
Methods
| Edit this page View SourceAddDynamicSerilog(ILoggingBuilder, LoggerConfiguration, Boolean)
Declaration
public static ILoggingBuilder AddDynamicSerilog(this ILoggingBuilder builder, LoggerConfiguration serilogConfiguration, bool preserveDefaultConsole = false)
Parameters
Type | Name | Description |
---|---|---|
ILoggingBuilder | builder | |
LoggerConfiguration | serilogConfiguration | |
System.Boolean | preserveDefaultConsole |
Returns
Type | Description |
---|---|
ILoggingBuilder |
AddDynamicSerilog(ILoggingBuilder, LoggerConfiguration, Boolean, Boolean)
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.
Declaration
public static ILoggingBuilder AddDynamicSerilog(this ILoggingBuilder builder, LoggerConfiguration loggerConfiguration, bool preserveStaticLogger, bool preserveDefaultConsole = false)
Parameters
Type | Name | Description |
---|---|---|
ILoggingBuilder | builder | The |
LoggerConfiguration | loggerConfiguration | An initial |
System.Boolean | preserveStaticLogger | Not supported! |
System.Boolean | preserveDefaultConsole | When true, do not remove Microsoft's ConsoleLoggerProvider |
Returns
Type | Description |
---|---|
ILoggingBuilder | The configured |
AddDynamicSerilog(ILoggingBuilder, Boolean)
Add Serilog with Console sink, wrapped in a IDynamicLoggerProvider that supports dynamically controlling the minimum log level via management endpoints
Declaration
public static ILoggingBuilder AddDynamicSerilog(this ILoggingBuilder builder, bool preserveDefaultConsole = false)
Parameters
Type | Name | Description |
---|---|---|
ILoggingBuilder | builder | The |
System.Boolean | preserveDefaultConsole | When true, do not remove Microsoft's ConsoleLoggerProvider |
Returns
Type | Description |
---|---|
ILoggingBuilder | The configured |
AddSerilogDynamicConsole(ILoggingBuilder)
Add Steeltoe logger wrapped in a IDynamicLoggerProvider that supports dynamically controlling the minimum log level via management endpoints
Declaration
public static ILoggingBuilder AddSerilogDynamicConsole(this ILoggingBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
ILoggingBuilder | builder | The |
Returns
Type | Description |
---|---|
ILoggingBuilder | The configured |
AddSerilogDynamicConsole(ILoggingBuilder, LoggerConfiguration, Boolean)
Add Steeltoe logger wrapped in a IDynamicLoggerProvider that supports dynamically controlling the minimum log level via management endpoints
Declaration
public static ILoggingBuilder AddSerilogDynamicConsole(this ILoggingBuilder builder, LoggerConfiguration loggerConfiguration, bool preserveStaticLogger = false)
Parameters
Type | Name | Description |
---|---|---|
ILoggingBuilder | builder | The |
LoggerConfiguration | loggerConfiguration | An initial |
System.Boolean | preserveStaticLogger | Indicates whether to preserve the value of |
Returns
Type | Description |
---|---|
ILoggingBuilder | The configured |