FreeAndNil commented on issue #252:
URL: 
https://github.com/apache/logging-log4net/issues/252#issuecomment-2949997101

   @lcrok thanks for reporting the issue.
   "log.GetAppender(appenderName) == null" + "log.AddAppender(fileAppender)" is 
not thread safe.
   When multiple threads call your GetLogger() method in parallel they will get 
the same logger instance, but many appenders will be created.
   What is the file size of the log files in the "bad" case?
   My proposal would be switching to a simpler lock mechanism (lock(syncRoot) 
and using a standard Dictionary<string, ILog> inside the lock).


-- 
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: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to