Skip to content

Commit

Permalink
Loggers per context
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko committed Jan 10, 2025
1 parent dae7454 commit 77e8a05
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dotnet/src/webdriver/Internal/Logging/LogContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ public LogContext(LogEventLevel level, ILogContext? parentLogContext, Concurrent

_parentLogContext = parentLogContext;

_loggers = loggers;
if (loggers is not null)
{
_loggers = new ConcurrentDictionary<Type, ILogger>(loggers.Select(l => new KeyValuePair<Type, ILogger>(l.Key, new Logger(l.Value.Issuer, level))));
}

if (handlers is not null)
{
Expand Down

0 comments on commit 77e8a05

Please sign in to comment.