Skip to content

Commit 77e8a05

Browse files
committed
Loggers per context
1 parent dae7454 commit 77e8a05

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dotnet/src/webdriver/Internal/Logging/LogContext.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ public LogContext(LogEventLevel level, ILogContext? parentLogContext, Concurrent
4646

4747
_parentLogContext = parentLogContext;
4848

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

5154
if (handlers is not null)
5255
{

0 commit comments

Comments
 (0)