Good Afternoon,
Am looking to control log4j2 output produced by Kafka...but am having a little 
difficultly getting this to work as expected.

During the kafka producer startup I've added this command:  
-Dlog4j2.configurationFile=/<whatever>/kafka/producers/log4j2.properties

I've created a log4j2.properties file as follows:

# Root Logger
rootLogger=INFO, STDERR

# Direct log messages to stderr
appender.console.type = Console
appender.console.name = STDERR
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] 
%C{1} - %msg%n

Yet, when I look at STDERR am not seeing the desired messages. Do I need to 
configure slf4j instead or in conjunction?  Anything I'm possibly doing wrong?

Anyone with experience on customizing kafka message logging, will to chime in?

Thank You,
--Alex

Reply via email to