davsclaus commented on code in PR #7392: URL: https://github.com/apache/camel/pull/7392#discussion_r847226013
########## core/camel-core-processor/src/main/java/org/apache/camel/processor/resume/ResumableCompletion.java: ########## @@ -70,6 +74,34 @@ public void onComplete(Exchange exchange) { @Override public void onFailure(Exchange exchange) { - LOG.warn("Skipping offset update for due to failure in processing"); + Exception e = exchange.getException(); + Object offset = exchange.getMessage().getHeader(Exchange.OFFSET); + + if (offset instanceof Resumable) { + Resumable<?, ?> resumable = (Resumable<?, ?>) offset; + + String logMessage = String.format( + "Skipping offset update with address '%s' and offset value '%s' due to failure in processing: %s", + resumable.getAddressable(), resumable.getLastOffset().offset(), e.getMessage()); + + if (LOG.isDebugEnabled()) { + CamelLogger.log(LOG, loggingLevel, logMessage, e); Review Comment: We would actually have 2 logging levels - LOG instance that are controlled by log4j properties - loggingLevel which is EIP option So I think you need to log with stacktraces if one of them is DEBUG, and hence you need to test both. And then the `loggingLevel` you pass in to CamelLogger should be hardcoded to DEBUG so its always logged at that level. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org