Table of Contents

Method DoConfigure

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

DoConfigure()

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

public override void DoConfigure()

Remarks

The base implementation refuses to run when Ploch.Common.DependencyInjection.ServicesBundle.Configuration is null. Every value this bundle reads from configuration is optional, though: without one the logger uses the predefined sinks and enrichers and the Information minimum level. Dispatching to Configure(IConfiguration?) in both cases lets services.AddSerilog() be called without an IConfiguration, as its documentation shows, and runs a subclass's Configure(IConfiguration?) override the same way with and without a configuration.