29 May,2019 by Rambler
Question: How can I create a trace log file in Kafka ? I want to set the logger level to TRACE , sending the trace details to a file.
Answer: To change from the current Kafka Connect logging level to the TRACE , you'll need to edit the connect-log4j.properties and restart Connect
edit - $(confluent_home)/etc/kafka/connect-log4j.properties
log4j.rootLogger=TRACE, traceFile, stdout log4j.appender.traceFile=org.apache.log4j.DailyRollingFileAppender log4j.appender.traceFile.DatePattern='.'yyyy-MM-dd-HH log4j.appender.traceFile.File=/tmp/kafka-connect-trace.log log4j.appender.traceFile.layout=org.apache.log4j.PatternLayout log4j.appender.traceFile.layout.ConversionPattern=[%d] %p %m (%c)%n
You'll need to restart Connect for the changes to take effect
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |