Follow dba-ninja.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

dba-ninja.com Links

Dba_db2_button

Sqlserver_dba_button

How to create a log trace and send to file in Kafka

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 


Author: Rambler (http://www.dba-ninja.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

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.

Working...

Post a comment on How to create a log trace and send to file in Kafka


dba-ninja.com