Logging Azure Function App log entries using Serilog gotchas

1 · Christopher Lopes · May 28, 2021, midnight
The problem # Azure Functions are great, except logging configuration is not the same as .Net Core applications and there are a number of ways logging can be configured incorrectly which leads to unexpected behavior. One such scenario I recently experienced was sending the Function App logs to Serilog. This was accomplished in start up using the AddLogging extension method. Log.Logger = new LoggerConfiguration() .WriteTo.Console() .CreateLogger();builder.Services .AddSingleton(Log.Logge...