log4j.rootLogger=INFO
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.streams=DEBUG
log4j.additivity.org.apache.kafka.streams=false
Logging
Kafka Streams uses Apache Log4j 2 for logging service.
The main logger is org.apache.kafka.streams. Use log4j.properties to set the logging levels.
Application Logging Using log4j — log4j.properties
Logging Configuration File
log4j.properties
Tip
|
Save log4j.properties in src/main/resources in your Kafka Streams application’s project.
|
Simple Logging Facade for Java (SLF4J)
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? |