Hi Tara, I'm using a UDP socket log server and experiencing the same issue. The LogEvent passed from the socket client to the socket server has a "getThrownProxy()" value, but no "getThrown()" value. You're not seeing the stack trace on the server, because the normal logging code doesn't print out the ThrowableProxy value.
I tried to get around the issue by writing my own UDP socket server that hackily appends thrownProxy.getExtendedStackTraceAsString() to the message if it exists, but then I ran into this bug in getExtendedStackTraceAsString(): https://issues.apache.org/jira/browse/LOG4J2-914 The linked issue was fixed on December 14th. I'm anxiously awaiting the Log4j2 maintainers to push a new version so I can stop running my code against snapshot versions. :) Dmitry On Wed, Feb 11, 2015 at 3:05 PM, Tara Czutno <[email protected]> wrote: > > We updated our codebase recently from log4j2 v2.0-rc1 to v2.1. We use a > SocketServer. Once we did upgraded, we are not seeing exception stack > traces on lines where we used to. For example: > try { > throw new RuntimeException("Do you now to log my stackTrace? > stringstringstringE"); > } catch (Exception e) { > LOGGER.error("Do you now to log my stackTrace? a:{} b:{} c:{} Yes, > I do!", "3443","4444","55555",e); > } > Does not give the stack trace. Running locally with a test log4j2 config > just writing to a file will give the stack trace. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
