The Kafka appender uses the Kafka client library, and that client library
does it's own logging through SLF4J, it always emits a few log messages at
DEBUG level on each message sent.

If you have log4j-slf4j-impl in classpath and enable DEBUG logging through
KafkaAppender, you will get recursive logging, and the application gets
stuck.

The recursive logging prevention in AppenderControl does not protect
against this as far as I can see. I have put in some protection in
KafkaAppender:
https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/mom/kafka/KafkaAppender.java#L133

Without this, you get recursive logging.

-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
[email protected]
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Reply via email to