Table of Contents

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 ILoggingBuilder

The 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 ILoggingBuilder

The ILoggingBuilder to configure.

serilogConfiguration LoggerConfiguration

Enables 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 ILoggingBuilder

The ILoggingBuilder to configure.

serilogConfiguration LoggerConfiguration

Enables to configure Serilog from code instead of configuration.

preserveDefaultConsole bool

When 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 ILoggingBuilder

The ILoggingBuilder to configure.

preserveDefaultConsole bool

When set to true, does not remove existing logger providers.

Returns

ILoggingBuilder

The incoming builder so that additional calls can be chained.