Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnol-VN committed Jan 23, 2025
1 parent 3dee034 commit 518c6a4
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/Logging/InitializationLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,19 @@ public static class InitializationLogger
/// <summary>
/// Instance of logger
/// </summary>
public static ILogger Instance { get; private set; } = LoggerFactory.Create(builder =>
public static ILogger Instance
{
if (Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") == "Development")
{
builder.AddConsole();
}
get =>
LoggerFactory.Create(builder =>
{
if (Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") == "Development")
{
builder.AddConsole();
}

s_loggingBuilderAction?.Invoke(builder);
}).CreateLogger("Initial-Logging");
s_loggingBuilderAction?.Invoke(builder);
}).CreateLogger("Initial-Logging");
}

/// <summary>
/// Action to customize the initialization logger builder
Expand Down

0 comments on commit 518c6a4

Please sign in to comment.