logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: Console appender with and without ANSI output
Date Wed, 10 Jul 2013 02:04:09 GMT
Ping?

Thank you,
Gary

On Sun, Jul 7, 2013 at 2:32 AM, Gary Gregory <garydgregory@gmail.com> wrote:

> Hi All,
>
> I'm seeing something odd in trunk:
>
> When I run
> org.apache.logging.log4j.core.appender.ConsoleAppenderAnsiStyleLayoutMain
>
> I see double stack traces:
>
> [30m2013-07-07 02:27:09,904 [m [34m[main] [m [33mFATAL: [m [32mFatal
> message.
> [m [30m2013-07-07 02:27:09,906 [m [34m[main] [m [33mERROR: [m [32mError
> message.
> [m [30m2013-07-07 02:27:09,907 [m [34m[main] [m [33mWARN : [m [32mWarning
> message.
> [m [30m2013-07-07 02:27:09,907 [m [34m[main] [m [33mINFO : [m
> [32mInformation message.
> [m [30m2013-07-07 02:27:09,907 [m [34m[main] [m [33mDEBUG: [m [32mDebug
> message.
> [m [30m2013-07-07 02:27:09,907 [m [34m[main] [m [33mTRACE: [m [32mTrace
> message.
> [m [30m2013-07-07 02:27:09,907 [m [34m[main] [m [33mERROR: [m [32mError
> message.
> java.io.IOException: test
>     at
> org.apache.logging.log4j.core.appender.ConsoleAppenderAnsiStyleLayoutMain.main(ConsoleAppenderAnsiStyleLayoutMain.java:44)
> [m java.io.IOException: test
>     at
> org.apache.logging.log4j.core.appender.ConsoleAppenderAnsiStyleLayoutMain.main(ConsoleAppenderAnsiStyleLayoutMain.java:44)
> [test-classes/:?]
>
> Note that the last one includes jar provenance.
>
> The patter in /log4j-core/src/test/resources/log4j2-console-style-ansi.xml
> is:
>
> %style{%d{ISO8601}}{black} %style{[%t]}{blue} %style{%-5level:}{yellow}
> %style{*%msg%n%throwable*}{green}
>
> When I switch the test to use
>
> /log4j-core/src/test/resources/log4j2-console.xml, the output contains a
> single track trace without jar provenance. The patter there is:
>
> %d{ISO8601} [%t] %-5level: %msg%n%throwable
>
> Looks like a bug in pattern/layout parsing?
>
> Gary
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
> 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
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
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

Mime
View raw message