The throwables do not preserve the stack trace after serialization, so they are useless on the server side. That is why the throwable variable is transient. However, there is another variable, throwableInfo, which preserves stack trace information after serialization. By the way, we are talking about stack traces of exceptions, right?
At 07:59 AM 8/25/2003 +0200, Thomas Svensen wrote:
Hi fellow "loggers"!
I am setting up a logging scheme where a number of "satelite systems" report logging events via sockets to a central logger. I will only send events about a certain level, e.g. ERROR.
This was very easy and simple to set up, but one problem arose: I couldn't see the stack trace in the central logger. I read the javadoc and found the following under LoggingEvent:
------------ javadoc start ------------------
public ThrowableInformation getThrowableInformation() Returns the throwable information contained within this event. May be null if there is no such information.
Note that the Throwable object contained within a ThrowableInformation does not survive serialization.
------------ javadoc end ------------------
Why has ThrowableInformation been declared transient? For performance reasons? Is there a simpler solution to this than writing my own LoggingEvent and other required classes?
Thanks for any feedback on this :-)
Thomas Svensen ------------------------------------- System Developer Cellus Norway mailto:[EMAIL PROTECTED] fixed line: (+47) 23 23 44 25 mobile: (+47) 918 23 480
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Ceki For log4j documentation consider "The complete log4j manual" ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
