7 ms·
https://github.com/serilog/serilog-settings-configuration https://github.com/serilog/serilog-settings-configuration (JSON) and https://github.com/serilog/serilo
by nblumhardt 10y ago
https://github.com/serilog/serilog-settings-configuration https://github.com/serilog/serilog-settings-configuration (JSON) and https://github.com/serilog/serilog-settings-appsettings https://github.com/serilog/serilog-settings-appsettings (XML) should have pretty much everything covered - anything particular missing? Cheers!
- adontz 10y agoIf these https://github.com/serilog/serilog-settings-configuration/blob/dev/sample/Sample/appsettings.json https://github.com/serilog/serilog-settings-configuration/bl... https://github.com/serilog/serilog-settings-appsettings/blob/dev/test/Serilog.Settings.AppSettings.Tests/app.config https://github.com/serilog/serilog-settings-appsettings/blob... are more or less what can be done, than yes, comparing to NLog configuration possibilities Serilog is very weak. I do not position myself as NLog expert, but I had time to learn it and use in complex scenarios, so just opened NLog.config of one of my project and here is what I use. The following is not NLog vs Serilog comparison, it is very brief "what I use in NLog" vs "what I did not find in serilog by just viewing files in browser". So, I want everything to be configured from config file and changed after program is compiled. * Asynchronous wrapper for any log target with some parameters to tune if necessary. * Colorful output to console (separately to stdout and stderr). I can specify colors based on event properties using condition attribute. Using conditions applies to other log targets and other scenarios. * For file target I can specify various log archiving option, based on date, counter, rolling counter, etc. Paths can include references to special folders, process IDs, thread IDs, event event properties, etc., not only environment variables. * Did not find any concept of rules NLog has. I want to be able to freely map event parameters (name, level) to targets. Again, I have no experience with Serilog, so I expect myself to be wrong and least partially.
- nblumhardt 10y agoThanks for the reply! NLog's configuration story is certainly impressive; I think the differences in approach make them hard to compare directly on some of these however (for example, most sinks based on network I/O do asynchronous batching by default in Serilog). Just on the topic of console output, you might enjoy the "literate console" - https://nblumhardt.com/2015/06/contender-for-nets-prettiest-console/ https://nblumhardt.com/2015/06/contender-for-nets-prettiest-... - for a different take on colored console output :-) Cheers!