When I instantiate a Kafka consumer
KafkaConsumer<String,String> consumer = new KafkaConsumer<String,String>(props);
I get this message
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
How do I enable logging for my client program?
Add this property file
src/main/resources/log4j.properties
to your project:This will enable logging. You can then set the standard options such as debug level, output format, etc, as per the logging documentation.