Project:
View Revisions: Issue #36527 | [ All Revisions ] [ Back to Issue ] | ||
Summary | 0036527: OBException should not log itself by default | ||
Revision | 2017-07-24 11:48 by alostale | ||
Description | Currently default behavior of OBException constructors is to log the newly created instance including stack trace. This, in most of the cases, creates unnecessary log. Note this pattern is also used in many places, which makes things worse, as the exception including its stack trace is logged twice: try { ... if (failed) throw new OBException("Something failed"); } catch (OBexception e) { log.error("Something failed", e); ... } |
||
Revision | 2017-07-24 11:47 by alostale | ||
Description | Currently default behavior of OBException constructors is to log the newly created instance including stack trace. This, in most of the cases, creates unnecessary log. This behavior is going to be changed so auto log will occur only if: * It is explicitly indicated to constructor through boolean parameter * Logger for the exception class is set to at least debug level Note this pattern is also used in many places, which makes things worse, as the exception including its stack trace is logged twice: try { ... if (failed) throw new OBException("Something failed"); } catch (OBexception e) { log.error("Something failed", e); ... } |
Copyright © 2000 - 2009 MantisBT Group |