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

Using variables in GelfLayout's additional fields at runtime

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.2, 2.7
    • 2.8
    • Layouts
    • None

    Description

      Hello,
      I would like to suggest the following improvements for GelfLayout:
      1. Using variables in additional fields at runtime. For example resolving "value": "$${ctx:key}" at runtime as it is done in other places. Thus, custom lookups will be available as well.
      2. Having an indicator includeThreadContext to control whether the contents of the ThreadContext should be included. Sometimes it is usable to include only some of its values and then it will be available using the first suggested improvement by specific variable resolution.
      3. Resolving HOST attribute in case it is not provided by using for example InetAddress.getLocalHost().getHostName().

      Regards,
      Alexander

      Attachments

        1. patchfile.txt
          7 kB
          Alexander K.
        2. patchfile.txt
          8 kB
          Alexander K.

        Issue Links

        Activity

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

          People

            mikaelstaldal Mikael Ståldal
            alexkra@amdocs.com Alexander K.
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment