Support Questions

Find answers, ask questions, and share your expertise

Kafka logs

Kafka is logging under /var/log.kafka but space it is taking is huge . We tried to suppress INFO and WARN messages from logs but still I could see WARN messages in the log files .

Please find below kafka logs config we have in Advanced kafka-log4j

log4j.logger.kafka=ERROR, kafkaAppender$=WARN,


Do I need to comment$=WARN, in order to suppress warning as well .

Note : I wanted only Error messages in the log files .


Super Mentor

@Anurag Mishra

I see a very similar thread of yours here:

Didn't the following setting work for you? Are you setill seeing WARN / INFO messages?

log4j.logger.kafka=ERROR, kafkaAppender


If you want to filter/Suppress any specific entry from the log then please share the exact WARNING message that you want to suppress.

Super Mentor

@Anurag Mishra

If you really want to suppress the logs containing any specific string which is getting repeated again and again then you might want to use the Log4j "StringMatchFilter" as described in the following article:

@Jay Kumar SenSharma

Yes Jay, after making changes as you mentioned in different thread , Still I am seeing WARN messages in the logs , and log size is growing with rapid speed .

@Jay Kumar SenSharma

is$=WARN, property enabling logging WARN messages ?

Super Mentor

@Anurag Mishra

This line means for the package ending with "" Will long WARNIN or above logging level means WARNING , ERROR, FATAL, CRITICAL ,,etc

But it will not log INFO

I am still not able to understand why I am seeing WARN messages spite of setting log4j.logger.kafka=ERROR, kafkaAppender

@Jay Kumar SenSharma

and what If I change$ to ERROR ?

@Jay Kumar SenSharma

Hi Jay please find below configs :

log4j.logger.kafka=ERROR, kafkaAppender$=WARN, requestAppender$=false, requestAppender

#log4j.logger.kafka.server.KafkaApis=TRACE, requestAppender


log4j.logger.kafka.request.logger=WARN, requestAppender


log4j.logger.kafka.controller=TRACE, controllerAppender


log4j.logger.kafka.log.LogCleaner=ERROR, cleanerAppender


log4j.logger.state.change.logger=TRACE, stateChangeAppender