Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
2.3
-
None
-
None
Description
org.apache.logging.log4j.core.layout.AbstractLayout line 34 :
// TODO: Charset is not serializable. Implement read/writeObject() ? private final Charset charset;
The developer has recognised that this class claims to be serializable, but is not actually serializable.
This actually has wide impact due to the fact that the Logger is holding onto the Layout via the org.apache.logging.log4j.core.Logger.PrivateConfig#config (XML in my case). Many projects, including Spring, do not use static Loggers and prefer getClass type approaches off of their abstract classes, i.e.:
protected final Log logger = LogFactory.getLog(getClass());
This actually can lead to use of spring session beans, which are serialized with the session, trying to serialize the logger also and failing due to this bug.
Attachments
Issue Links
- duplicates
-
LOG4J2-801 org.apache.logging.log4j.core.Logger should be serializable
- Resolved
- is required by
-
LOG4J2-801 org.apache.logging.log4j.core.Logger should be serializable
- Resolved