logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mika Riekkinen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LOG4J2-932) LogEvent stacktrace not visible on TcpSocketServer
Date Wed, 07 Jan 2015 14:29:35 GMT
Mika Riekkinen created LOG4J2-932:
-------------------------------------

             Summary: LogEvent stacktrace not visible on TcpSocketServer
                 Key: LOG4J2-932
                 URL: https://issues.apache.org/jira/browse/LOG4J2-932
             Project: Log4j 2
          Issue Type: Bug
          Components: Appenders
    Affects Versions: 2.1
            Reporter: Mika Riekkinen
            Priority: Minor


When using Socket appender to transfer LogEvents to another host, LogEvent is missing Throwable
causing stacktrace not to be shown on SocketServer.

This bug has been reported earlier with id LOG4J2-886
(https://issues.apache.org/jira/browse/LOG4J2-886), which explains it.

The cause of the problem is that stored Throwable in Log4jLogEvent, Log4jLogEvent.LogEventProxy
and ThrowableProxy is transient.

As it is now, using of TcpSocketServer is very limited.

I made a quick test, where those transient fields mentioned above are declared as not being
transient, and this works ok. 
But this is not a proper way to fix this.

A better one could be to change these from Serializable to Externalizable, where classloading
of the Throwable is controlled.
Also, it could be possible to come up with fix, where a class that actually writes the stacktrace,
could use ExtendedStackTraceElement[] if the Throwable is null.

 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message