Skip to content

Commit

Permalink
Log Exception object directly (#669)
Browse files Browse the repository at this point in the history
Instead of logging the Exception type and stack-trace separately, use
`Logger.error(String msg, Throwable t)` to log the message and stack-trace in a
single ERROR entry.
  • Loading branch information
astahlman authored Apr 9, 2020
1 parent 48b2a2f commit 916c25d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/com/linkedin/drelephant/ElephantRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,7 @@ public void run() {
logger.warn("Timed out while fetching data. Exception message is: " + e.getMessage());
jobFate(finishTimeInfo, appType, applicableFinishTime, jobFinishTime);
} catch (Exception e) {
logger.error(e.getMessage());
logger.error(ExceptionUtils.getStackTrace(e));
logger.error(String.format("Failed to analyze %s", analysisName), e);
jobFate(finishTimeInfo, appType, applicableFinishTime, jobFinishTime);
}
}
Expand Down

0 comments on commit 916c25d

Please sign in to comment.