Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0036527 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
design defect | [Openbravo ERP] A. Platform | minor | have not tried | 2017-07-24 11:47 | 2017-07-28 15:27 | |||
Reporter | alostale | View Status | public | |||||
Assigned To | alostale | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR17Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 9c333865058f | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | caristu | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0036527: OBException should not log itself by default | |||||||
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); ... } | |||||||
Steps To Reproduce | Write and execute: new OBException("something failed"); check it generates log including stack trace | |||||||
Proposed Solution | 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 See: http://wiki.openbravo.com/wiki/How_To_Log#OBException [^] | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||||||||||||||||||
|
Notes | |
(0098195) hgbot (developer) 2017-07-24 12:06 |
Repository: erp/devel/pi Changeset: 9c333865058f015c5ee62ce023b95a1efd9210c3 Author: Asier Lostalé <asier.lostale <at> openbravo.com> Date: Fri Jul 21 07:48:49 2017 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/9c333865058f015c5ee62ce023b95a1efd9210c3 [^] fixed 36527: OBException should not log itself by default Changed default OBException behavior: now it only logs itself on creation if explicitly set or if loger level is debug --- M src/org/openbravo/base/exception/OBException.java --- |
(0098263) caristu (developer) 2017-07-28 15:27 |
Code reviewed + testing OK. |
Issue History | |||
Date Modified | Username | Field | Change |
2017-07-24 11:47 | alostale | New Issue | |
2017-07-24 11:47 | alostale | Assigned To | => platform |
2017-07-24 11:47 | alostale | Modules | => Core |
2017-07-24 11:47 | alostale | Triggers an Emergency Pack | => No |
2017-07-24 11:48 | alostale | Description Updated | View Revisions |
2017-07-24 11:48 | alostale | Proposed Solution updated | |
2017-07-24 11:49 | alostale | Relationship added | blocks 0036162 |
2017-07-24 11:49 | alostale | Assigned To | platform => alostale |
2017-07-24 12:05 | alostale | Review Assigned To | => caristu |
2017-07-24 12:06 | alostale | Relationship added | related to 0036183 |
2017-07-24 12:06 | hgbot | Checkin | |
2017-07-24 12:06 | hgbot | Note Added: 0098195 | |
2017-07-24 12:06 | alostale | Relationship added | related to 0036207 |
2017-07-24 12:06 | hgbot | Status | new => resolved |
2017-07-24 12:06 | hgbot | Resolution | open => fixed |
2017-07-24 12:06 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/9c333865058f015c5ee62ce023b95a1efd9210c3 [^] |
2017-07-24 12:07 | alostale | Relationship added | related to 0036208 |
2017-07-28 15:27 | caristu | Note Added: 0098263 | |
2017-07-28 15:27 | caristu | Status | resolved => closed |
2017-07-28 15:27 | caristu | Fixed in Version | => 3.0PR17Q4 |
Copyright © 2000 - 2009 MantisBT Group |