Avoid logging twice using netcore2.0 on AWS Lambda with Serilog
问题 After upgrading my netcore project to 2.0, i see double logs when my application is running on AWS Lambda, which utilizes the Serilog framework. Please see my setup below: public void ConfigureServices(IServiceCollection services) { ... // Setup logging Serilog.Debugging.SelfLog.Enable(Console.Error); var logger = new LoggerConfiguration() .MinimumLevel.Debug() .Enrich.FromLogContext(); if (GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT", "").Equals("local")) logger.WriteTo.Console(); else