logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Sicker (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1099) AbstractStringLayout implements Serializable, but is not Serializable
Date Sun, 11 Oct 2015 23:31:05 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-1099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14952491#comment-14952491

Matt Sicker commented on LOG4J2-1099:

I'm noticing that this bug is actually more related to LOG4J2-801, so this won't really be
fixed in time for 2.4.1.

> AbstractStringLayout implements Serializable, but is not Serializable
> ---------------------------------------------------------------------
>                 Key: LOG4J2-1099
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1099
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Layouts
>    Affects Versions: 2.3
>            Reporter: Louis Burton
>            Assignee: Matt Sicker
>            Priority: Critical
> {{org.apache.logging.log4j.core.layout.AbstractLayout}} line 34 :
> {code}
>     // TODO: Charset is not serializable. Implement read/writeObject() ?
>     private final Charset charset;
> {code}
> The developer has recognised that this class claims to be serializable, but is not actually
> 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.:
> {code}
> protected final Log logger = LogFactory.getLog(getClass());
> {code} 
> 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.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message