2

This is what I am doing now:

        Log.Logger = new LoggerConfiguration()
            .ReadFrom.AppSettings()
            .WriteTo.Logger(l => l.Filter.ByIncludingOnly(Matching.WithProperty("XXX")).WriteTo.File("output.txt"))
            .CreateLogger();

I have my main Logger set up in app.config, but I can't figure out the syntax for specifying a sub-logger there. I'd really like to avoid mixing code and appSettings configuration.

4

1 回答 1

0

不,这在今天使用 Serilog 是不可能的。

于 2015-09-30T20:57:19.913 回答