aawad6 commented on code in PR #1637:
URL: https://github.com/apache/logging-log4j2/pull/1637#discussion_r1285088139
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/HighlightConverter.java:
##########
@@ -87,6 +87,10 @@ public final class HighlightConverter extends
LogEventPatternConverter implement
private static final String STYLE_KEY = "STYLE";
+ private static final String DISABLE_ANSI_KEY = "DISABLEANSI";
+
+ private static final String NO_CONSOLE_NO_ANSI_KEY = "NOCONSOLENOANSI";
+
Review Comment:
I think we still need the UPPERCASE keys for both `disableAnsi `and
`noConsoleNoAnsi`.
The issue arises when the `key` is obtained and transformed to UPPERCASE
characters. Next, search for that key in the `dontEscapeKeys` array. If the
`key` was previously supplied as lowercase, the `escape` variable will be <0,
which means the `value` was overridden.
```
final String key = toRootUpperCase(keyValue[0]);
final String value = keyValue[1];
final boolean escape = Arrays.binarySearch(sortedIgnoreKeys, key) < 0;
map.put(key, escape ? createSequence(value.split("\\s")) : value);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]