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

Enhance ContextDataInjector to be more flexible

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.13.2
    • Component/s: None
    • Labels:
      None

      Description

      ContextDataInjector allows that it be completely replaced by setting a system property. But this is very heavyweight just to add new properties to every event.

      New Relic has a need to inject trace data into the event and are currently using a custom MessageFactory to do it, which has its problems. A better approach would be to allow DataIntector providers that are located via ServiceLoader and call each one during construction of a LogEvent.

        Attachments

          Activity

            People

            • Assignee:
              rgoers Ralph Goers
              Reporter:
              rgoers Ralph Goers
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: