Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0006553Openbravo ERPA. Platformpublic2008-12-15 15:092009-05-28 10:40
rafaroda 
shuehner 
normalminorN/A
closedfixed 
5
pi 
2.40MP5 
Core
No
0006553: Logging of this exception in HttpSecureAppServlet is done very badly
This 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.

change 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
comsup_sprint5
blocks defect 0006182 closed shuehner Logging of this exception in HttpSecureAppServlet is done very badly 
Issue History
2008-12-15 15:09rafarodaNew Issue
2008-12-15 15:09rafarodaAssigned To => gmauleon
2008-12-15 15:09rafarodaRegression testing => No
2008-12-15 15:09rafarodaIssue generated from0006182
2008-12-15 15:09rafarodaRelationship addedblocks 0006182
2008-12-15 15:10rafarodaStatusnew => scheduled
2008-12-15 15:10rafarodafix_in_branch => 2.40
2009-01-15 17:06svnbotCheckin
2009-01-15 17:06svnbotNote Added: 0012230
2009-01-15 17:06svnbotStatusscheduled => resolved
2009-01-15 17:06svnbotResolutionopen => fixed
2009-01-15 17:06svnbotsvn_revision => 11949
2009-01-15 17:26gmauleonStatusresolved => new
2009-01-15 17:26gmauleonResolutionfixed => open
2009-01-15 17:26gmauleonNote Added: 0012232
2009-01-15 17:26gmauleonStatusnew => scheduled
2009-01-15 17:26gmauleonfix_in_branch2.40 => trunk
2009-01-15 17:28gmauleonNote Deleted: 0012230
2009-01-15 17:28gmauleonNote Deleted: 0012232
2009-01-15 17:29gmauleonsvn_revision11949 =>
2009-01-15 17:29gmauleonfix_in_branchtrunk => 2.40
2009-01-27 14:31svnbotCheckin
2009-01-27 14:31svnbotNote Added: 0012687
2009-01-27 14:31svnbotStatusscheduled => resolved
2009-01-27 14:31svnbotResolutionopen => fixed
2009-01-27 14:31svnbotsvn_revision => 12318
2009-01-28 12:10gmauleonTag Attached: comsup_sprint5
2009-03-03 17:32psarobeFixed in Version => 2.40MP3
2009-03-04 17:29psarobeStatusresolved => closed
2009-04-27 15:38shuehnerStatusclosed => new
2009-04-27 15:38shuehnerResolutionfixed => open
2009-04-27 15:38shuehnerNote Added: 0015795
2009-04-27 15:38shuehnerFixed in Version2.40MP3 =>
2009-04-28 13:43shuehnerAssigned Togmauleon => shuehner
2009-05-20 15:14shuehnerNote Added: 0016524
2009-05-21 18:33hgbotCheckin
2009-05-21 18:33hgbotNote Added: 0016564
2009-05-21 18:33hgbotStatusnew => resolved
2009-05-21 18:33hgbotResolutionopen => fixed
2009-05-21 18:33hgbotFixed in SCM revision12318 => http://code.openbravo.com/erp/stable/2.40/rev/646b9636ad7bb77a82450d94712522033413675f [^]
2009-05-28 10:40psarobeStatusresolved => closed

Notes
(0012687)
svnbot   
2009-01-27 14:31   
Repository: openbravo
Revision: 12318
Author: gmauleon
Date: 2009-01-27 14:31:31 +0100 (Tue, 27 Jan 2009)

fixes 0006553: Logging of this exception in HttpSecureAppServlet is done very badly

---
U branches/r2.40/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
---

https://dev.openbravo.com/websvn/openbravo/?rev=12318&sc=1 [^]
(0015795)
shuehner   
2009-04-27 15:38   
reopen, as related defect is reopened.
(0016524)
shuehner   
2009-05-20 15:14   
Issue pending, waiting for 2.40 branch to reopen.
(0016564)
hgbot   
2009-05-21 18:33   
Repository: erp/stable/2.40
Changeset: 646b9636ad7bb77a82450d94712522033413675f
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Wed May 13 11:00:43 2009 +0200
URL: http://code.openbravo.com/erp/stable/2.40/rev/646b9636ad7bb77a82450d94712522033413675f [^]

Fixed 6553: improve logging of exceptions (include stacktraces)

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