[
https://issues.apache.org/jira/browse/LOG4J2-3537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17554438#comment-17554438
]
Pavel_K edited comment on LOG4J2-3537 at 6/15/22 7:44 AM:
----------------------------------------------------------
[~pkarwasz] Yes, I agree with you that 9x codes are not in the standard. But,
then it is possible to do the following:
# In the configuration it is anyway necessary to set `TRACE=bold blue `,
because it is not about brightness, but the boldness. Besides it is necessary
to update manual about this - I spent much time trying to figure what what
wrong with my palette (bright colors) but the problem was that bright colors
were not used.
# I suggest instead of adding `bright_*` resolve this issue:
https://issues.apache.org/jira/browse/LOG4J2-3538 . Because: 1) it is nearer to
the standard (as 38 reserved for future standardization; intended for setting
character foreground colour as specified in ISO 8613-6) 2) it is 21'st century,
so, there is no reason to change 3 bit palette to 4 bit one. I suggest to add
24 bit color support.
was (Author: pavel_k):
[~pkarwasz] Yes, I agree with you that 9x codes are not in the standard. But,
then it is possible to do the following:
# In the configuration it is anyway necessary to set `TRACE=bold blue `,
because it is not about brightness, but the boldness. Besides it is necessary
to update manual about this - I spent much time trying to figure what what
wrong with my palette (bright colors) but the problem was that bright colors
were not used.
# I suggest instead of adding `bright_*` resolve this issue:
https://issues.apache.org/jira/browse/LOG4J2-3538 . Because: 1) it is nearer to
the standard (as 38 reserved for future standardization; intended for setting
character foreground col our as speci fied in ISO 8613-6) 2) it is 21'st
century, so, there is no reason to change 3 bit palette to 4 bit one. I suggest
to add 24 bit color support.
> Ansi escape code for highlight is generated wrong
> -------------------------------------------------
>
> Key: LOG4J2-3537
> URL: https://issues.apache.org/jira/browse/LOG4J2-3537
> Project: Log4j 2
> Issue Type: Bug
> Affects Versions: 2.14.1
> Reporter: Pavel_K
> Assignee: Piotr Karwasz
> Priority: Minor
> Attachments: Screenshot from 2022-06-14 16-09-30.png, Screenshot from
> 2022-06-14 16-13-13.png
>
>
> This is a test pattern layout:
> {code:java}
> <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS}
> %highlight{[%level]}{FATAL=red bright, ERROR=red bright, WARN=yellow bright,
> INFO=magenta bright, DEBUG=green, TRACE=blue bright} [%t] %logger{36} -
> %msg%n" disableAnsi="false"/>
> {code}
> As you see for TRACE level is `blue bright`. However, this is a generated
> code:
> [34;1m[TRACE][m . As you see we have
> [SGR|https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters]
> function with two parameters: 34 is color and 1 is bold.
> For example linux terminal will render it this way:
> !Screenshot from 2022-06-14 16-09-30.png!
> We see, that it is not `bright blue` but `bold blue`. At the same time in
> [manual|https://logging.apache.org/log4j/2.x/manual/layouts.html] they speak
> about different colors:
> !Screenshot from 2022-06-14 16-13-13.png!
> And if we want bright blue, generated escape code should be `[94m[TRACE][m`
> - see the link to SGR function I provided.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)