Martin Kleppmann created SAMZA-275:
--------------------------------------
Summary: 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
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)