Update logging configuration in Program.cs
Modified logging setup to use NLog only in non-development environments, while maintaining trace-level logging for development.
This commit is contained in:
parent
a76afdda34
commit
941e47ba3e
@ -10,9 +10,13 @@ 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" : "";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user