[
https://issues.apache.org/jira/browse/SAMZA-275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14019294#comment-14019294
]
Chris Riccomini commented on SAMZA-275:
---------------------------------------
Nice catch.
+1 on RB. Make sure to include patch on JIRA.
> Exception stack traces not logged
> ---------------------------------
>
> Key: SAMZA-275
> URL: https://issues.apache.org/jira/browse/SAMZA-275
> Project: Samza
> Issue Type: Bug
> Affects Versions: 0.7.0
> Reporter: Martin Kleppmann
> Assignee: Martin Kleppmann
> Fix For: 0.7.0
>
> Attachments: SAMZA-275.patch
>
>
> In various places we are using the following logging idiom for exceptions:
> {noformat}
> try { ... } catch {
> case e: Exception =>
> info("Something went wrong: %s. Turn on debug for details." format e)
> debug(e)
> }
> {noformat}
> Unfortunately that doesn't have the desired effect, because slf4j calls
> .toString() on the first argument to the log method, so the debug log ends up
> containing only the exception name and message, but not the stack trace.
> For the stack trace to be logged, the exception must be the second argument,
> like this:
> {noformat}
> debug("Exception detail:", e)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)