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

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment