Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-3538

Add support for 24 colors for highlighting

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.18.0
    • None
    • None

    Description

      Currently for highlighting in pattern layout we have only 16 colors, for example:

       <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %highlight{[%level]}{FATAL=red bright} [%t] %logger{36} - %msg%n" disableAnsi="false"/>
      

      At the same time true colors in SGR function are also supported. So, I suggest to add support of this colors, for example this way:

       <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %highlight{[%level]}{FATAL=#ff0000} [%t] %logger{36} - %msg%n" disableAnsi="false"/>
      

      and generated code should be:

      ESC[38;2;255;0;0m
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Pavel_K Pavel_K
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: