Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
MinimumLevel.ControlledBy谁能向我解释一下 Serilog和MinimumLevel.Overrideweb api 核心有什么区别?
MinimumLevel.ControlledBy
MinimumLevel.Override
ControlledBy让您指定一个将控制日志记录的 Switch 变量 - 可以调整此开关(例如,通过定期查看全局设置)
ControlledBy
Override允许您提供一次值,该值会冻结到整体配置中。
Override
后者提供更好的性能(尽管不是通常重要的因素)