【发布时间】:2015-09-29 12:33:32
【问题描述】:
这就是我现在正在做的事情:
Log.Logger = new LoggerConfiguration()
.ReadFrom.AppSettings()
.WriteTo.Logger(l => l.Filter.ByIncludingOnly(Matching.WithProperty("XXX")).WriteTo.File("output.txt"))
.CreateLogger();
我在 app.config 中设置了我的主记录器,但我无法弄清楚在那里指定子记录器的语法。我真的很想避免混合代码和 appSettings 配置。
【问题讨论】:
标签: serilog