You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Robert Middleton (Jira)" <lo...@logging.apache.org> on 2022/12/02 02:33:00 UTC
[jira] [Commented] (LOGCXX-566) Configurable output colors for log messages
[ https://issues.apache.org/jira/browse/LOGCXX-566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17642236#comment-17642236 ]
Robert Middleton commented on LOGCXX-566:
-----------------------------------------
We should also have pre-set colors if possible. This would be somewhat similar to what libfmt does, but as text in our configuration file.
ideas:
<param name="errorColor" value="red"/> <-- red color text(foreground implied)
<param name="errorColor" value="bg(red)|fg(white)|bold"/> <-- red background, white text, bold
<param name="errorColor" value="\x1b[7m"/> <-- white letters on black background(ANSI escape code directly set by user)
> Configurable output colors for log messages
> -------------------------------------------
>
> Key: LOGCXX-566
> URL: https://issues.apache.org/jira/browse/LOGCXX-566
> Project: Log4cxx
> Issue Type: Improvement
> Reporter: Robert Middleton
> Assignee: Robert Middleton
> Priority: Major
> Fix For: 1.0.0
>
>
> With the %Y formatter, we can colorize the log output messages depending on their level.
>
> This should be expanded to have a parameter on the PatternLayout that you can use to apply the colors. For example, error is currently "\x1B[91m" for red, but this should be user-configurable so that it can be a different color if required.
> This also means that things such as bold text can be configured by the user.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)