Hi All,

method org.apache.logging.log4j.web.appender.ServletAppender.append(LogEvent)
is defined as:

    public void append(final LogEvent event) {

Instead of:

    public void append(final LogEvent event) {
getLayout()).toSerializable(event)*, event.getThrown()*);

Which does not give the best information we have to the servlet context

The tricky part is that to avoid logging the exception twice like in our
test org.apache.logging.log4j.web.ServletAppenderTest. To avoid the double
logging, we could (1) document not using a %exception in the pattern layout.

That or (yikes) (2) provide a variation of the toSerializable(event) like
toSerializable(event, false), where the boolean is an ignoreException
parameter. It seems there are plenty of places where exceptions are treated
specially already, this would be another.

I like (1) better because it is simpler.


Thank you,

E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
Java Persistence with Hibernate, Second Edition
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Reply via email to