Table of Contents

Class SerilogConfigurationBundle

Namespace
Ploch.CommandLine.Spectre.Serilog
Assembly
Ploch.CommandLine.Spectre.Serilog.dll

Provides a Ploch.Common.DependencyInjection.ServicesBundle for configuring Serilog logging, optionally reading further settings from an IConfiguration. Allows optional customisation of the log output template, log name, log file path, and the culture used to format values in the log files.

public class SerilogConfigurationBundle : ConfigurableServicesBundle, IServicesBundle, IOptionalConfigurationProvider, IConfigurationConsumer
Inheritance
ServicesBundle
ConfigurableServicesBundle
SerilogConfigurationBundle
Implements
IServicesBundle
IOptionalConfigurationProvider
IConfigurationConsumer
Inherited Members
ServicesBundle.Configuration
ServicesBundle.Services
ServicesBundle.Dependencies

Constructors

SerilogConfigurationBundle(string?, string?, string?, CultureInfo?)

Provides a Ploch.Common.DependencyInjection.ServicesBundle for configuring Serilog logging, optionally reading further settings from an IConfiguration. Allows optional customisation of the log output template, log name, log file path, and the culture used to format values in the log files.

Methods

Configure(IConfiguration?)

Configures the services with Serilog based on the provided configuration and logging parameters.

DoConfigure()

Calls Configure(IConfiguration?) whether or not a configuration was supplied to the bundle.