zartc opened a new issue, #1545:
URL: https://github.com/apache/logging-log4j2/issues/1545
## Description
When using the HighlightConverter like this: `%highlight{%5level}{LOGBACK}`
the HighlightConverter always uses the colors of the DEFAULT preset instead of
the color of the LOGBACK as asked.
## Configuration
**Version:** 2.20.0
**Operating system:** Windows 10
**JDK:** temirun-11
## Logs
none
## Reproduction
Configure a converter with: `%highlight{%5level}{LOGBACK}`
You will discover that the HighlightConverter always uses the colors of the
DEFAULT preset.
## Fixe
`HighlightConverter.createLevelStyleMap()` method is missing a check at line
151 to see if the passed `options[1]` contains a map of LEVEL=color or a preset
style name.
```java
if (!string.contains("=")) {
return STYLES.getOrDefault(string, DEFAULT_STYLES);
}
```
--
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]