[slf4j-dev] [Bug 176] Initialization (getILoggerFactory) is not thread safe

bugzilla-daemon at qos.ch bugzilla-daemon at qos.ch
Wed Feb 5 06:23:28 CET 2014


http://bugzilla.slf4j.org/show_bug.cgi?id=176

--- Comment #29 from Chetan Mehrotra <chetan.mehrotra at gmail.com> ---
> FWIW the fix in fixSubstitutedLoggers() method isn't really thread-safe either.

As per current code flow it is thread safe. 'fixSubstitutedLoggers' is invoked
*after* the INITIALIZATION_STATE is set to SUCCESSFUL_INITIALIZATION. So by the
time it is invoked TEMP_FACTORY would not be in use and no further
SubstituteLogegrs would be created.

So the only downside is that only during the initialization phase some log
calls would be NOOP and log output would be lost. Similar situtation occurs in
Logback if the Logback config is reset and any log message arrives during that
phase. 

If that also needs to be addressed then we can move just the SimpleLogger to
slf4j-api module and use that in place of NOOP logger for the initial delegate
in SubstituteLogger

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-dev/attachments/20140205/edc4d143/attachment.html>


More information about the slf4j-dev mailing list