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 ;) )
|