Skip to content

Commit b8e0936

Browse files
rob93cceki
authored andcommitted
add constant to restore text attributes
Signed-off-by: Roberto Cella <[email protected]>
1 parent ec508c4 commit b8e0936

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

logback-core/src/main/java/ch/qos/logback/core/pattern/color/ANSIConstants.java

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class ANSIConstants {
1818
public final static String ESC_START = "\033[";
1919
public final static String ESC_END = "m";
2020
public final static String BOLD = "1;";
21+
public final static String RESET = "0;";
2122

2223
public final static String BLACK_FG = "30";
2324
public final static String RED_FG = "31";

logback-core/src/main/java/ch/qos/logback/core/pattern/color/ForegroundCompositeConverterBase.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
abstract public class ForegroundCompositeConverterBase<E> extends CompositeConverter<E> {
2626

27-
final private static String SET_DEFAULT_COLOR = ESC_START + "0;" + DEFAULT_FG + ESC_END;
27+
final private static String SET_DEFAULT_COLOR = ESC_START + RESET + DEFAULT_FG + ESC_END;
2828

2929
@Override
3030
protected String transform(E event, String in) {

0 commit comments

Comments
 (0)