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

Remove default layout from KafkaAppender

    Details

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

      Description

      If you don't specify any layout to KafkaAppender, it will simply include the log message as payload. This is not very useful and inconsistent with how other appenders work.

      It's better if there is no default layout for KafkaAppender, as will be the case for SocketAppender and JmsAppeder now when LOG4J2-1958 is done.

        Issue Links

          Activity

          Hide
          mikaelstaldal Mikael Ståldal added a comment -

          In Git master.

          Show
          mikaelstaldal Mikael Ståldal added a comment - In Git master.
          Hide
          garydgregory Gary Gregory added a comment -

          What about using PatternLayout.createDefaultLayout() as the default?

          Show
          garydgregory Gary Gregory added a comment - What about using PatternLayout.createDefaultLayout() as the default?
          Hide
          mikaelstaldal Mikael Ståldal added a comment -

          I don't think that's layout is very useful together with KafkaAppender. I think that you want something like GelfLayout, JsonLayout or (heaven forbid) SerializedLayout.

          Similar to JmsAppender, which now has no default.

          Show
          mikaelstaldal Mikael Ståldal added a comment - I don't think that's layout is very useful together with KafkaAppender. I think that you want something like GelfLayout, JsonLayout or (heaven forbid) SerializedLayout. Similar to JmsAppender, which now has no default.

            People

            • Assignee:
              mikaelstaldal Mikael Ståldal
              Reporter:
              mikaelstaldal Mikael Ståldal
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development