From 6ade388cd72a9368455d3cad5116707cc8bff4ad Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Fri, 9 May 2025 23:20:27 +0200 Subject: [PATCH] Enhance logging configuration in Program.cs Initialized logging by clearing providers, setting minimum level to Trace, and configuring NLog as the logging provider. --- Program.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Program.cs b/Program.cs index 7616c49..a527042 100644 --- a/Program.cs +++ b/Program.cs @@ -10,6 +10,10 @@ try { var builder = WebApplication.CreateBuilder(args); + builder.Logging.ClearProviders(); + builder.Logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace); + builder.Host.UseNLog(); + // Make sure to add the Ocelot configuration file var suffix = builder.Environment.IsDevelopment() ? ".Development" : ""; builder.Configuration.AddJsonFile($"ocelot{suffix}.json");