Project

General

Profile

Actions

Bug #9407

closed

We should not hide exceptions in logs

Added by François ARMAND over 7 years ago. Updated over 7 years ago.

Status:
Released
Priority:
3
Category:
System integration
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

Today, we are hiding exception stack in Rudder with the logback.xml config (the Ex{0} part):


<Pattern>%d{[yyyy-MM-dd HH:mm:ss]} %-5level %logger - %msg%n%xEx{0}</Pattern>

It may be that we did it because Java exception are really awful. But:

- the correct way to handle the problem of ugly exception is to carefuly handle all of them, not to hide them. If they are hidden, it is much harder to know that something is broken, whereas if we see the awful error, we want to handle it correctly. 
- that lead to completly impossible to debug errors: exception are rares, and they generally happen on specific context condition, hard to reproduced. So even if we try to display the exception again, it is not sure we will be able to. 
- user are used to Java exception. And we won't even imagine to hide for ex. Python stack trace. 
- there is rather few exception in Rudder (perhaps it was a time a where it was not the case, but not today anymore)

So for all the reasons, we should display exceptions.
Actions #1

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 318 to 4.0.0~rc2
Actions #2

Updated by François ARMAND over 7 years ago

  • Status changed from New to In progress
  • Assignee changed from Nicolas CHARLES to François ARMAND
Actions #3

Updated by François ARMAND over 7 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder/pull/1325
Actions #4

Updated by François ARMAND over 7 years ago

Based on http://logback.qos.ch/manual/layouts.html#xThrowable, I changed xEx{0} => ex{full}. That removes the package information (on left), what could have problems on some environnement (we didn't had the chance to test, since we used to remove the stack trace). Moreover, it can take some time to resolve. As we already have the information from the classes, I think we don't need that.

Actions #5

Updated by François ARMAND over 7 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #6

Updated by Alexis Mousset over 7 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.0.0 which was released the 10th November 2016.

Actions

Also available in: Atom PDF