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

Using variables in GelfLayout's additional fields at runtime

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.2, 2.7
    • Fix Version/s: 2.8
    • Component/s: Layouts
    • Labels:
      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
          8 kB
          Alexander K.
        2. patchfile.txt
          7 kB
          Alexander K.

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: