logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allan Crooks <a...@dcs.qmw.ac.uk>
Subject HTMLPrintWriter
Date Thu, 08 Mar 2001 16:46:14 GMT

In reference to the bug I submitted that throwable information isn't
printed in HTMLLayout after the LoggingEvent is serialized.

Well, I did mail my (somewhat inefficient) hack, where the
throwableInformation is read back in with a StringReader, and a
BufferedReader is wrapped round it, and then each line is read from the
reader and then written to HTMLPrintWriter.

Well, I've quickly written a couple of writer classes similar to
StringWriter, except that it returns an array of strings instead of just
one string. Every invocation of println indicates to the internal writer object that a line
has been terminated, and it then starts a new one.

I've tested it to retrieve information about a stack trace, and it seems
to work quite well, so if anyone's interested, could you let me know? I'm
not on the mailing list, so could any reply be cc:'d to me as well,

I think the LoggingEvent class could be changed so that the
throwableInformation is actually an array of strings rather than a string,
therefore, a layout can then concatenate the strings with /n, /r, <br>
or whatever it wishes to put returns...

Anyway, let me know what you think,

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

View raw message