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

Support default value for missing key in look ups with fallbacking to looking in the properties map

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.0-rc2
    • None
    • None

    Description

      It is more useful and flexible to allow default value in the variable expression itself.
      For example,

      ${var1:-defvalue1},
      ${ctx:request_id:-defvalue2}, etc.
      

      This generic feature has been included in StrSubstitutor of commons-lang3 as well with the following issue:

      The benefit from the feature with LANG-893 is we can use it more widely whenever used in look ups.

      Attachments

        1. LOG4J2-419-patch.txt
          22 kB
          Woonsan Ko

        Issue Links

          Activity

            People

              Unassigned Unassigned
              woon_san Woonsan Ko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: