GitHub user huxihx opened a pull request:
https://github.com/apache/kafka/pull/3703
KAFKA-5755: KafkaProducer should be refactored to use LogContext
With LogContext, each producer log item is automatically prefixed with
client id and transactional id.
@hachikuji
Since a new parameter `logContext` is passed into `Sender` constructor
which breaks the max parameter count in checkstyle, I also increased it to 14
now.
And since all the static methods where `log` is used are private in
KafkaProducer, I did not check the nullness for it in those methods.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/huxihx/kafka KAFKA-5755
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/3703.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3703
----
commit 099c2f9592fc7d137b9f08fac75017e1f00e9323
Author: huxihx <[email protected]>
Date: 2017-08-21T02:57:31Z
KAFKA-5755: KafkaProducer should use LogContext instead of the default
LoggerFactory.
With LogContext, each producer log item is automatically prefixed with
client id and transactional id.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---