Method Configure
- Namespace
- Ploch.CommandLine.Spectre.Serilog
- Assembly
- Ploch.CommandLine.Spectre.Serilog.dll
Configure(IConfiguration?)
Configures the services with Serilog based on the provided configuration and logging parameters.
protected override void Configure(IConfiguration? configuration)
Parameters
configurationIConfigurationThe IConfiguration that may provide additional Serilog settings, or null when the bundle was registered without one, in which case the predefined setup is used unchanged.
Remarks
The parameter is declared nullable here although the base class declares it non-nullable: the base class
documents that the value can be null, and this bundle really does run without one. A subclass that overrides
this method to add its own registrations runs in both cases; declare its parameter as
IConfiguration? as well and tolerate null.