Details
-
Bug
-
Resolution: Fixed
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
major
-
P1
-
71
Description
SLF4JLocationAwareLog (in jcl104-over-slf4j) should implement Serializable.
Reason:
Some (third-party) implementations use non-static JCL loggers in serializable classes. This works (at least with Log4J) because JCLs Log4JLogger implements Serializable and has a transient reference to the actual Log4J Logger, which it creates lazily on demand.
Of course only adding the Serializable marker interface to SLF4JLocationAwareLog is not enough. Also the non transient reference to the LocationAwareLogger (the Log4jLoggerAdapter in that case) must be serializable then. This leads to the problem that Log4jLoggerAdapter must not have a non transient reference to the actual Log4J Logger, but also create it lazily.
Don't know how difficult it is to fix that.
But as I said before, this issue can severily break third-party libs (NotSerializableException) when JCL is replaced by jcl104-over-slf4j.
Regards,
Manfred