fluffynuts commented on code in PR #157:
URL: https://github.com/apache/logging-log4net/pull/157#discussion_r1692730299
##########
src/log4net/Repository/Hierarchy/Hierarchy.cs:
##########
@@ -660,43 +660,62 @@ public Logger GetLogger(string name, ILoggerFactory
factory)
var key = new LoggerKey(name);
- // Synchronize to prevent write conflicts. Read conflicts (in
- // GetEffectiveLevel() method) are possible only if variable
- // assignments are non-atomic.
+ while (true)
+ {
+ if (TryCreateLogger(key, factory) is Logger result)
+ {
+ return result;
Review Comment:
there needs to be some kind of bailout here - after a certain number of
attempts, die (rather than locking up the host machine / application with a
continual loop)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]