You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Piotr Karwasz (Jira)" <ji...@apache.org> on 2022/06/19 11:36:00 UTC
[jira] [Resolved] (LOG4J2-3538) Add support for 24 colors for highlighting
[ https://issues.apache.org/jira/browse/LOG4J2-3538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Piotr Karwasz resolved LOG4J2-3538.
-----------------------------------
Resolution: Fixed
[~Pavel_K],
I have merged both your PRs and a {{2.17.3-SNAPSHOT}} is available from {{https://repository.apache.org/snapshots}}.
Can you check if it solves your problems and close the issues?
> 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
> Fix For: 2.18.0
>
>
> 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)