Can anyone please explain to me what is the difference between Serilog MinimumLevel.ControlledBy
and MinimumLevel.Override
in web api core?
Asked
Active
Viewed 282 times
0

Roberto Caboni
- 7,252
- 10
- 25
- 39

TAMILSELVAN C
- 21
- 1
1 Answers
1
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)

Ruben Bartelink
- 59,778
- 26
- 187
- 249