[KAFKA-310] Add connector id to all log messages Created: 19/Apr/22  Updated: 31/Aug/22  Resolved: 16/Aug/22

Status: Closed
Project: Kafka Connector
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Ross Lawley Assignee: Ross Lawley
Resolution: Won't Fix Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to DOCS-15597 MongoDB Kafka Connector - Explain How... Closed
Epic Link: Extended debugging for Kafka Connector
Case:

 Description   

If Kafka connect is running multiple MongoDB connectors its not clear which connector is generating the log message. Making debugging log messages very tricky.

Investigate if it is possible to set the connector name / id to each log message.



 Comments   
Comment by Ross Lawley [ 16/Aug/22 ]

Nothing to do in the connector - just requires the correct configuration in the log4j.properties file:

connect.log.pattern=[%d] %p %X{connector.context}%m (%c:%L)%n

See: https://docs.confluent.io/platform/current/connect/logging.html

Comment by Ross Lawley [ 15/Aug/22 ]

See: https://cwiki.apache.org/confluence/display/KAFKA/KIP-449%3A+Add+connector+contexts+to+Connect+worker+logs

Generated at Thu Feb 08 09:06:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.