Skip to content

Commit

Permalink
#111 less locking in Hierarchy.GetCurrentLoggers
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeAndNil committed Jul 31, 2024
1 parent 53a6684 commit 04e14cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/log4net/Repository/Hierarchy/Hierarchy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public override ILogger[] GetCurrentLoggers()
{
// The accumulation in loggers is necessary because not all elements in
// loggers are Logger objects as there might be some ProvisionNodes as well.
return loggers.Values.OfType<Logger>().ToArray();
return loggers.Select(logger => logger.Value).OfType<ILogger>().ToArray();
}

/// <summary>
Expand Down

0 comments on commit 04e14cd

Please sign in to comment.