log4j.rootLogger=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c)%n
log4j.logger.org.apache.kafka.clients.consumer.ConsumerConfig=DEBUG
Logging
Application Logging Using log4j — log4j.properties
Logging Configuration File
log4j.properties
Tip
|
Save log4j.properties in src/main/resources in your Kafka application’s project.
|
Kafka uses Simple Logging Facade for Java (SLF4J) for logging.
Tip
|
Use build.sbt
Replace slf4j’s simple binding to switch between logging frameworks (e.g. build.sbt
|
Note
|
With logback’s configuration (as described in the above tip) you may see the following messages in the logs:
Commenting out build.sbt
FIXME: Explain why the commenting out is required? |