How to log Exceptions with PatternLayout ?...
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rami_Abramson
Posted On:   Wednesday, December 18, 2002 04:35 AM

			
Hello,

Have found in log4j docs that:
"SimpleLayout and PatternLayout classes ignore Java Throwable errors and exceptions. HTMLLayout and XMLLayout handle them."

Is it possible somehow to make the Throwables and Exceptions seen in the Fatal debug level when working with PatternLayout?

thank you,

Rami

Re: How to log Exceptions with PatternLayout ?...

Posted By:   Mark_Womack  
Posted On:   Friday, January 3, 2003 05:02 PM

While there is no way to include the exception as part of the layout pattern for PatternLayout, if you include the throwable when you log the message (ie logger.fatal("a message", exception), then it will get printed in the log. I'm pretty sure of that. Try it. -Mark
About | Sitemap | Contact