You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2013/09/03 20:49:53 UTC

[jira] [Commented] (LOG4J2-272) malfunction of coloring with escaped characters (newline, tab,...)

    [ https://issues.apache.org/jira/browse/LOG4J2-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13756907#comment-13756907 ] 

Gary Gregory commented on LOG4J2-272:
-------------------------------------

Hello Martin,

I am attaching a screen shot of what I see as the output of org.apache.logging.log4j.core.appender.ConsoleAppenderAnsiStyleJira272Main based on the current trunk code.

You example string comes out on several lines and all in yellow. Isn't that would you expect?

Please try the current code from trunk (which you'll have to build). 

Alternatively, you can wait for Beta9.

Thank you,
Gary
                
> malfunction of coloring with escaped characters (newline, tab,...)
> ------------------------------------------------------------------
>
>                 Key: LOG4J2-272
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-272
>             Project: Log4j 2
>          Issue Type: Bug
>    Affects Versions: 2.0-beta6
>         Environment: Windows XP, Netbeans 7.3, Java 6
>            Reporter: Martin Vavrušák
>
> I have this XML configuration
> {code:xml}
> <configuration status="WARN">
>   <appenders>
>     <Console name="Console" target="SYSTEM_OUT">
>       <PatternLayout pattern="%highlight{%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n}{FATAL=bright red, ERROR=red, WARN=yellow, INFO=blue, DEBUG=green, TRACE=bright blue}"/>
>     </Console>
>   </appenders>
>   <loggers>
>     <root level="TRACE">
>       <appender-ref ref="Console"/>
>     </root>
>   </loggers>
> </configuration>
> {code}
> with pom:
> {code:xml}
>         <dependency>
>             <groupId>org.apache.logging.log4j</groupId>
>             <artifactId>log4j-api</artifactId>
>             <version>2.0-beta6</version>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.logging.log4j</groupId>
>             <artifactId>log4j-core</artifactId>
>             <version>2.0-beta6</version>
>         </dependency>
>         
>         <dependency>
>             <groupId>org.fusesource.jansi</groupId>
>             <artifactId>jansi</artifactId>
>             <version>1.11</version>
>         </dependency>
> {code}
> Coloring work fine until try to format text with newline or tab.
> {code:java}
> logger.warn("this is ok \n And all \n this have only\t\tblack colour \n and here is colour again?");
> {code}
> only first part (up to first \n) of log is colored the res of log is in black.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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