Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-514

Create a libfmt layout

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0
    • None
    • None

    Description

      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:

      [{localdate}] {logger:-20p} {level} - {message}{newline}
      

       

      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?
      • Make sure that if fmt is not available, we don't fail - this should be an optional dependency.

      Attachments

        Issue Links

          Activity

            People

              rmiddleton Robert Middleton
              rmiddleton Robert Middleton
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: