diff --git a/Program.cs b/Program.cs index a527042..391d106 100644 --- a/Program.cs +++ b/Program.cs @@ -9,10 +9,14 @@ logger.Info("Logging initialized."); try { var builder = WebApplication.CreateBuilder(args); - - builder.Logging.ClearProviders(); + builder.Logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); - builder.Host.UseNLog(); + + if (!builder.Environment.IsDevelopment()) + { + builder.Logging.ClearProviders(); + builder.Host.UseNLog(); + } // Make sure to add the Ocelot configuration file var suffix = builder.Environment.IsDevelopment() ? ".Development" : "";