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

FlumeAppender should allow interceptors to be specified on embedded agent

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-beta6
    • 2.0-beta7
    • Appenders
    • None

    Description

      A Flume agent can be configured to have interceptors. Events are sent to the interceptors which can drop or modify them before passing them on. Currently, the embedded Flume agent does not allow them to be set because it prevents a configuration with any property that starts with sources.

      This is annoying when setting up a configuration to log Flume itself. In our environment we tag log events with the environment, host and component using interceptors. Sending Flume's logs to the same agent causes issues so the logs have to be sent to another agent. While it would be possible to configure that alternative agent to accept incoming events on a separate port per host and component that is a lot of configuration work to maintain.

      The provided patch allows interceptors to be set but continues to disallow other properties that starts with sources. Updated unit tests and a documentation update are also included.

      Attachments

        1. log4j2-interceptors.diff
          4 kB
          Edward Sargisson

        Activity

          People

            Unassigned Unassigned
            ejsarge Edward Sargisson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: