Similar Posts

2 Comments

  1. Hi,
    Not sure if you are aware. But it looks like since the time of your post (Apr 30 2022) looks like Serilog has had some code change. Specifically I have noticed 2 issues.
    1) When using Serilog File Sink in the appsettings.json the “Args” section of “WriteTo:File” requires a “Name” setting. Don’t know what it does but if you don’t specify it you get an exception while configuring Serilog for logging in Program.cs.
    2) The “outputTemplate” setting doesn’t work when specified in the appsettings.json. Only work when specified in the call to .WriteTo.File() while configuring Serilog.

    Finally I noticed that just installing the NuGet package Serilog.AspNetCore seems to be sufficient. No compile time or runtime errors. So what’s the value of the other packages?! Also the Serilog documentation on github SUCKS!!! Looks like its written by and for people who know the source code intimately. That’s why your posts is quite helpful to a someone trying to learn.

    Kind Regards…

Leave a Reply

Your email address will not be published. Required fields are marked *