You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Allan Crooks <am...@dcs.qmw.ac.uk> on 2001/02/08 21:46:58 UTC

Problem with HTMLLayout

Hi,

I don't know if my last message got through (I haven't recieved it yet,
and I sent it about 30 mins ago), but the problem I had relates to
HTMLLayout.

HTMLLayout currently checks the event.throwable field, and only prints it
out if the field contains something other than null. However, when the
LoggingEvent is serialised, the Throwable object is discarded, and it's
string representation is stored in throwableInformation instead. But as
HTMLLayout doesn't test that field for content information, now stack
trace gets printed.

I'm just about to submit this as a bug, btw....

I've attached my previous message underneath, just in case you want to
know what I'm on about. :) The last message was somewhat incorrect, I got
confused with my code (so it doesn't really matter what priority it is, I
just want it to display the stack trace of any throwable object).

Allan.

-------------------

Hi,

Sorry for asking probably a straight forward question (and giving a fairly
ambiguous subject header, I don't think it even strictly relates to the
question I'm about to ask), but here goes.

I'm currently using HTMLLayout, but I want the stack trace to be printed
for any WARN or ERROR messages. I'm currently using SocketAppender to pass
the messages along. Can anyone tell me how I could do this?

I'm sure I used SocketAppender, and did have some stack trace information
being printed, but that was a long time ago... :)

And yes, I am using the error (Object, Throwable) message method.

Any ideas?
Allan.