Difference between Serilog MinimumLevel.ControlledBy and MinimumLevel.Override in web api core?

326 views Asked by At

Can anyone please explain to me what is the difference between Serilog MinimumLevel.ControlledBy and MinimumLevel.Override in web api core?

1

There are 1 answers

0
Ruben Bartelink On

ControlledBy lets you nominate a Switch variable which will control the logging - this switch can be adjusted (e..g by periodically looking at a global setting)

Override lets you provide a value once, that gets frozen into the overall configuration.

The latter provides better performance (though not by a factor that normally matters)