Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kafka connector logs

I am working on kafka connectors and by time my connectors are increasing. So my log file is getting really messy, I was wondering if it is possible to have separate log file for each connector.

like image 786
yousuf iqbal Avatar asked Feb 02 '18 13:02

yousuf iqbal


People also ask

Where are kafka connector logs?

The Kafka Connect Log4j properties file is located in the Confluent Platform installation directory path etc/kafka/connect-log4j. properties .

How do I check kafka logs?

If you open script kafka-server-start or /usr/bin/zookeeper-server-start , you will see at the bottom that it calls kafka-run-class script. And you will see there that it uses LOG_DIR as the folder for the logs of the service (not to be confused with kafka topics data). Show activity on this post.

Where are kafka connectors stored?

A reference configuration for distributed mode can be found at $CONFLUENT_HOME/etc/kafka/connect-distributed.

Is kafka using Log4j?

x. The following components in Apache Kafka use Log4j-v1. 2.17 : broker, controller, zookeeper, connect, mirrormaker and tools. Clients may also be configured to use Log4j-v1.


2 Answers

you can use grep command to view only the required logs.

command: tail /var/log/kafka/connect.log -f | grep -n 'phrase to search'

your path for log file could be different.

like image 75
haseeb Ahmed Avatar answered Oct 13 '22 21:10

haseeb Ahmed


Whatever you are trying to achieve is not possible as of current Kafka-connect implementation. But there is a KIP under discussion which may help you when it's accepted and implemented. https://cwiki.apache.org/confluence/display/KAFKA/KIP-449%3A+Add+connector+contexts+to+Connect+worker+logs

like image 30
avp Avatar answered Oct 13 '22 20:10

avp