[
https://issues.apache.org/jira/browse/KAFKA-1591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14129185#comment-14129185
]
Guozhang Wang commented on KAFKA-1591:
--------------------------------------
Thank you for the patches. I few comments below:
0. Could you merge all the changes into one patch file, since committing works
easier with single patch?
1. We no longer need "possible cause: " in the log content. Instead we can just
print the Exception.toString() at the end of the log entry. I think there are
some other places where we write "possible cause: " that can possible result in
"possible cause: null" if we are using Exception.getMessage(). Can you also
search and clean them?
2. There are some other places that we may want to reduce the stack trace, for
example:
a. In SyncProducer, "error("Producer connection to " + config.host + ":" +
config.port + " unsuccessful", e)".
I think we should just remove this line since the exception is re-thrown, and
hence the upper-level caller will catch it and handle / log it.
b. In ClientUtils, "warn("Fetching topic metadata with correlation id %d for
topics [%s] from broker [%s] failed".format(correlationId, topics,
shuffledBrokers(i).toString), e)"
We can remove the stack trace logging also.
I think it would be good to just go through all the error / warn logging and
check if it prints the stack trace, and if that iss that really useful, in the
sense that 1) the possibly thrown exception will be likely Kafka exceptions 2)
the possibly thrown exception will be from a nested calling trace.
> Clean-up Unnecessary stack trace in error/warn logs
> ---------------------------------------------------
>
> Key: KAFKA-1591
> URL: https://issues.apache.org/jira/browse/KAFKA-1591
> Project: Kafka
> Issue Type: Bug
> Reporter: Guozhang Wang
> Labels: newbie
> Fix For: 0.9.0
>
> Attachments: Jira-1591-SocketConnection-Warning.patch,
> Jira1591-SendProducerRequest-Warning.patch
>
>
> Some of the unnecessary stack traces in error / warning log entries can
> easily pollute the log files. Examples include KAFKA-1066, etc.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)