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 2020/12/29 23:09:00 UTC

[jira] [Created] (LOGCXX-514) Create a libfmt layout

Robert Middleton created LOGCXX-514:
---------------------------------------

             Summary: Create a libfmt layout
                 Key: LOGCXX-514
                 URL: https://issues.apache.org/jira/browse/LOGCXX-514
             Project: Log4cxx
          Issue Type: New Feature
            Reporter: Robert Middleton
            Assignee: Robert Middleton


As an alternative to the PatternLayout that currently exists, create a Layout that uses libfmt to create the formatting of the message.  This would utilize the fmt named parameters feature to replicate the %-replacements of PatternLayout.

 

The configuration would look something like this:
{code:java}
[{localdate}] {logger:-20p} {level} - {message}{newline}
{code}
 

Things to figure out:
 * How to replicate %c\{2} --> a.b.c prints as b.c
 ** Probably need to add this as a parameter instead of encoding in the format string
 * Similar to the above, how to handle arbitrary MDC key?  Add a parameter to the layout?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)