Created 02-02-2018 06:46 AM
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
log4j.logger.kafka.network.RequestChannel$=WARN,
requestAppender log4j.additivity.kafka.network.RequestChannel$=false
Do I need to comment log4j.logger.kafka.network.RequestChannel$=WARN, in order to suppress warning as well .
Note : I wanted only Error messages in the log files .
Created 02-02-2018 06:54 AM
I see a very similar thread of yours here: https://community.hortonworks.com/questions/170028/supress-info-and-warn-from-logs.html
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.
Created 02-02-2018 06:56 AM
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:
Created 02-02-2018 09:16 AM
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 .
Created 02-02-2018 09:21 AM
is log4j.logger.kafka.network.RequestChannel$=WARN, property enabling logging WARN messages ?
Created 02-02-2018 09:28 AM
This line means for the package ending with "kafka.network.RequestChannel" Will long WARNIN or above logging level means WARNING , ERROR, FATAL, CRITICAL ,,etc
But it will not log INFO
Created 02-02-2018 09:40 AM
I am still not able to understand why I am seeing WARN messages spite of setting log4j.logger.kafka=ERROR, kafkaAppender
Created 02-02-2018 09:42 AM
and what If I change log4j.logger.kafka.network.RequestChannel$ to ERROR ?
Created 02-02-2018 09:37 AM
Hi Jay please find below configs :
log4j.logger.kafka=ERROR, kafkaAppender
log4j.logger.kafka.network.RequestChannel$=WARN, requestAppender
log4j.additivity.kafka.network.RequestChannel$=false
#log4j.logger.kafka.network.Processor=TRACE, requestAppender
#log4j.logger.kafka.server.KafkaApis=TRACE, requestAppender
#log4j.additivity.kafka.server.KafkaApis=false
log4j.logger.kafka.request.logger=WARN, requestAppender
log4j.additivity.kafka.request.logger=false
log4j.logger.kafka.controller=TRACE, controllerAppender
log4j.additivity.kafka.controller=false
log4j.logger.kafka.log.LogCleaner=ERROR, cleanerAppender
log4j.additivity.kafka.log.LogCleaner=false
log4j.logger.state.change.logger=TRACE, stateChangeAppender
log4j.additivity.state.change.logger=false