![]() |
|
|
|
|
Issue Type:
|
Bug
|
|
Affects Versions:
|
1.0.6 |
|
Assignee:
|
Logback dev list
|
|
Components:
|
logback-classic |
|
Created:
|
17/Aug/12 2:47 PM
|
|
Description:
|
It seems that color is not reset to default value after use.
public static class SampleCode {
public static void main(String[] args) {
log.trace("test");
log.debug("test");
log.info("test");
log.warn("test");
log.error("test");
}
}
logback.groovy:
appender("STDOUT", ConsoleAppender) {
withJansi = true
encoder(PatternLayoutEncoder) {
pattern = "%d{yyyyMMdd HH:mm:ss} %blue(%mdc{contener}) %thread %highlight(%-5level) %msg %n"
}
}
root(DEBUG, ["STDOUT"])
------
In ForegroundCompositeConverterBase (line 36) color is reset by appending:
sb.append(SET_DEFAULT_COLOR);// ESC_START+DEFAULT_FG+ESC_END;
ANSIConstants.DEFAULT_FG has value: public final static String DEFAULT_FG = "39";
After searching in jansi sources, I've found that color reset is invoked by inserting \033[0m
(and it works for me too ;) )
|
|
Environment:
|
Windows
|
|
Project:
|
logback
|
|
Labels:
|
logging
jansi
consoleoutput
|
|
Priority:
|
Minor
|
|
Reporter:
|
Mikolaj Grajek
|
|
|
|
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
|
_______________________________________________
logback-dev mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-dev