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

PatternLayout %notEmpty should consider an MDC with no keys as empty

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.17.2
    • 2.21.0
    • Layouts, Pattern Converters
    • None

    Description

      Introducing MDC logging over on HBASE-27762, we noticed an annoyance when writing a patter to ship by default. When the MDC contains no keys, %notEmpty still considers it as non-empty and renders as "{}". I expected that notEmpty would consider the absence of any keys in the MDC as an empty object.

      Attachments

        Issue Links

          Activity

            People

              vy Volkan Yazici
              ndimiduk Nick Dimiduk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: