[
https://issues.apache.org/jira/browse/LOG4J2-3538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17554430#comment-17554430
]
Piotr Karwasz commented on LOG4J2-3538:
---------------------------------------
To implement this I would add a condition to {{AnsiEscape#createSequence}},
that will generate '38;2;x;y;z' if the keyword starts with '#' or 'FG_#' and
generate '48;2;x;y;z' if it starts with 'BG_#'.
[~Pavel_K], can you provide a PR?
> Add support for 24 colors for highlighting
> ------------------------------------------
>
> Key: LOG4J2-3538
> URL: https://issues.apache.org/jira/browse/LOG4J2-3538
> Project: Log4j 2
> Issue Type: Improvement
> Reporter: Pavel_K
> Priority: Major
>
> Currently for highlighting in pattern layout we have only 16 colors, for
> example:
> {code:java}
> <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS}
> %highlight{[%level]}{FATAL=red bright} [%t] %logger{36} - %msg%n"
> disableAnsi="false"/>
> {code}
> At the same time true colors in SGR function are also
> [supported|https://en.wikipedia.org/wiki/ANSI_escape_code#24-bit]. So, I
> suggest to add support of this colors, for example this way:
> {code:java}
> <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS}
> %highlight{[%level]}{FATAL=#ff0000} [%t] %logger{36} - %msg%n"
> disableAnsi="false"/>
> {code}
> and generated code should be:
> {code:java}
> ESC[38;2;255;0;0m
> {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)