samza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Kleppmann (JIRA)" <>
Subject [jira] [Created] (SAMZA-275) Exception stack traces not logged
Date Thu, 05 Jun 2014 21:14:02 GMT
Martin Kleppmann created SAMZA-275:

             Summary: Exception stack traces not logged
                 Key: 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:

try { ... } catch {
  case e: Exception =>
    info("Something went wrong: %s. Turn on debug for details." format e)

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:

debug("Exception detail:", e)

This message was sent by Atlassian JIRA

View raw message