Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0006182
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. PlatformminorN/A2008-11-24 16:182009-06-03 11:58
ReportershuehnerView Statuspublic 
Assigned Toshuehner 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision31eb902bcdec
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0006182: Logging of this exception in HttpSecureAppServlet is done very badly

DescriptionThis issue is a spin-off of issue 6131 (part 4.):

Logging of Exception as (at least) the indicated source-code position has to be improved, as with the current code it is very hard to get all needed information.

4.) Logging of this exception is done very badly
    It is catched in HttpSecureAppServlet.java (line 262)
    Only the exception name is logged to log4j4j, not stacktrace
    the Stacktrace is printed on std-out
    Outcome: Info for this exception is spread over 2 log-files
    - openbravo.log for seeing "Error captured: NPE"
    - catalina.out (capturing std-out) for seeing the stacktrace without any timestamp and context information.

Proposed Solutionchange the logging from

log4j.error("text..." + e.getMessage())
e.printStackTrace()

to

log4j.error("text...", e)
remove the printStackTrace line
verify that the exception (text + stacktrace) is correctly logged into the log4j logfile
Tags250MP1
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0006131 closedgorka_gil Using "View details" on roks-module gives empty page with hidden NullPointerException 
depends on backport 0006553 closedshuehner Logging of this exception in HttpSecureAppServlet is done very badly 
blocks feature request 0006183 newTriage Platform Base Audit codebase and convert all <Exception>.printStackTrace() calls to proper log4j logging 

-  Notes
(0015792)
shuehner (administrator)
2009-04-27 15:34

Some of the changes where not done correctly. The printStackTrace have been removed but not all log.error calls have been changed to the correct form using

log4j.error("text", exception)

instead of the wrong
log4j.error("test" + exception)
(0015794)
shuehner (administrator)
2009-04-27 15:36

Needed changes:

- please check/convert all log4j.error("text" + exception), >= 6 cases which still use the +exception from (pi again)
- on the way please check for log4j.debug used for logging exception which must be .error ( one case using debug+error on (// Re-login in pi), and one just using debug instead of error to log an exception.
(0015798)
shuehner (administrator)
2009-04-27 15:54

Adding tag 250mp1 after checking with rafa
(0016314)
hgbot (developer)
2009-05-13 11:00

Repository: erp/devel/pi
Changeset: 31eb902bcdec72bdfd2b7c9bb3b36b1c543529dd
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Wed May 13 11:00:04 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/31eb902bcdec72bdfd2b7c9bb3b36b1c543529dd [^]

Fixed 6182: improve logging of exceptions (include stacktraces)

---
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
---

- Issue History
Date Modified Username Field Change
2008-11-24 16:18 shuehner New Issue
2008-11-24 16:18 shuehner Assigned To => rafaroda
2008-11-24 16:18 shuehner sf_bug_id 0 => 2339183
2008-11-24 16:18 shuehner Regression testing => No
2008-11-24 16:20 shuehner Relationship added blocks 0006183
2008-11-24 16:21 shuehner Relationship added related to 0006131
2008-12-15 09:40 rafaroda Status new => scheduled
2008-12-15 09:40 rafaroda Assigned To rafaroda => gmauleon
2008-12-15 09:40 rafaroda fix_in_branch => trunk
2008-12-15 15:09 rafaroda Issue cloned 0006553
2008-12-15 15:09 rafaroda Relationship added depends on 0006553
2009-01-15 17:27 gmauleon Status scheduled => resolved
2009-01-15 17:27 gmauleon Fixed in Version => trunk
2009-01-15 17:27 gmauleon svn_revision => 11949
2009-01-15 17:27 gmauleon Resolution open => fixed
2009-04-21 12:36 psarobe Status resolved => closed
2009-04-27 15:34 shuehner Status closed => new
2009-04-27 15:34 shuehner Resolution fixed => open
2009-04-27 15:34 shuehner Note Added: 0015792
2009-04-27 15:34 shuehner Fixed in Version pi =>
2009-04-27 15:36 shuehner Note Added: 0015794
2009-04-27 15:54 shuehner Tag Attached: 250MP1
2009-04-27 15:54 shuehner Note Added: 0015798
2009-04-28 13:30 psarobe Priority normal => urgent
2009-04-28 13:30 psarobe Status new => scheduled
2009-04-28 13:30 psarobe fix_in_branch pi =>
2009-04-28 13:42 shuehner Assigned To gmauleon => shuehner
2009-05-13 11:00 hgbot Checkin
2009-05-13 11:00 hgbot Note Added: 0016314
2009-05-13 11:00 hgbot Status scheduled => resolved
2009-05-13 11:00 hgbot Resolution open => fixed
2009-05-13 11:00 hgbot Fixed in SCM revision 11949 => http://code.openbravo.com/erp/devel/pi/rev/31eb902bcdec72bdfd2b7c9bb3b36b1c543529dd [^]
2009-06-03 11:58 psarobe Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker