0

I have created a custom log4j2 Kafka appender as I need to send the message in protocol buffers format. When I run the application, I see the following warning. How to make the custom appender override the default appender?

Plugin [kafka] is already mapped to class org.apache.logging.log4j.core.appender.mom.kafka.KafkaAppender, ignoring class com.abc.appender.KafkaAppender

NOTE: I have read the documentation in https://logging.apache.org/log4j/2.x/manual/plugins.html and it is not clear how to set the plugin override order.

janeshs
  • 793
  • 2
  • 12
  • 26

1 Answers1

1

You can define your custom plugin to have a different name. That should resolve the problem.

Remko Popma
  • 35,130
  • 11
  • 92
  • 114