[ https://issues.apache.org/jira/browse/SAMZA-275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Kleppmann updated SAMZA-275: ----------------------------------- Attachment: SAMZA-275.patch Attaching patch of a quick find-and-replace. RB: https://reviews.apache.org/r/22279/ > 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)