logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maarten Bosteels" <mbosteels....@gmail.com>
Subject Re: Suppressing stacktrace output
Date Thu, 20 Mar 2008 09:15:50 GMT

"If the layout handles the throwable object contained within LoggingEvent,
then the layout should return false. Otherwise, if the layout ignores
throwable object, then the layout should return true. The SimpleLayout,
TTCCLayout, PatternLayout all return true. The XMLLayout returns false."

For appenders that extend WriterAppender, the stacktrace will be appended by
the WriterAppender
when the layout ignores the throwable.


So I guess you could extend ConsoleAppender and override subAppend.


On Thu, Mar 20, 2008 at 1:26 AM, jimski <jimkski@gmail.com> wrote:

> Hi James-
> I think the layout determines if the stack trace is logged.  How are
> you configuring the console appender?
> I thought so too.  But it doesn't seem that's the case.  I'm using the
> following pattern:
> [%d{yyyy-MM-dd HH:mm:ss}] %-5p %m %n
> so I expect only a date, the level, the message and a newline character.
> --
> View this message in context:
> http://www.nabble.com/Suppressing-stacktrace-output-tp16145551p16168549.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message