[ 
https://issues.apache.org/jira/browse/CAMEL-13842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16903643#comment-16903643
 ] 

Claus Ibsen commented on CAMEL-13842:
-------------------------------------

We dont want many big ugly stacktraces, so what we usually do can be to log the 
stacktrace at DEBUG logging level so you can change the logging level to that. 
And also we should add the exception message, eg + " caused by: " + 
e.getMessage then you can see that detail which helps indicate what the issue is

> Improve Logging on KafkaConsumer when KafkaException is Thrown
> --------------------------------------------------------------
>
>                 Key: CAMEL-13842
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13842
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-kafka
>    Affects Versions: 3.0.0
>            Reporter: LEONARDO ZANDOMENICO VASCONCELLOS
>            Priority: Major
>
> The Kafka Camel component "hides" the stacktrace of exceptions occurring in 
> the following point. 
> {code:java}
> components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaConsumer.java
> ...
> log.warn("KafkaException consuming {} from topic {}. Will attempt to 
> re-connect on next run", threadId, topicName);
> reConnect = true;
> ...{code}
> It makes difficult to know the root of the KafkaException exception 
> (NullPointer for example) by seeing the log.
> Maybe change the log.warn to handtleException so we can see the full stack 
> trace in the log, since LoggingExceptionHandler logs the full stack trace.
> {code:java}
> ...
> getExceptionHandler().handleException("KafkaException consuming " + threadId 
> + " from topic " + topicName + ". Will attempt to re-connect on next run", e);
> reConnect = true;
> ...{code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to