what is the best way to add new Overrides into a configured Serilog Log>
If I set the Override(“MyNamespace1”) initially, then I can modify the LogLevel for that MyNamespace.
var overrideLevelSwitch = new Serilog.Core.LoggingLevelSwitch();
var loggerConfig = new LoggerConfiguration().ReadFrom.Configuration(builder.Configuration);
Log.Logger = loggerConfig
.MinimumLevel.Override("MyNamespace1", overrideLevelSwitch)
.CreateLogger();
Is there a way to ADD a new namespace dynamically into the Override, say from Controller endpoint, eg Override(“MyNamespace2”)? (without pre-defining it when .CreateLogger())