Openbravo Issue Tracking System - Modules
View Issue Details
0047974ModulesTax Report Launcherpublic2021-11-03 16:282022-12-27 16:23
shuehner 
francisco_ofarril 
normalminorhave not tried
closedfixed 
5
 
 
aferraz
0047974: Several modules from functional/omni team are using bad logging (System.out,System.err println or printStackTrace)
This issue is to track all leftover cases which have not been reported earlier

Modules in functional team:
      9 mods/org.openbravo.module.einvoice
      3 mods/org.openbravo.module.validto
      3 mods/org.openbravo.utility.multiplebpselector
     11 pmods/com.practicsbs.saftpt
      4 pmods/com.practicsbs.saftpt.retail
      1 pmods/org.openbravo.document.massinvoicing
    167 pmods/org.openbravo.idl
      3 pmods/org.openbravo.module.invoicematchingalgorithm
      4 pmods/org.openbravo.module.resources
      3 pmods/org.openbravo.sepa.iso20022.camt
In any workspace having the relevant modules run to get the overview:

grep -IrE "System.out|System.err|printStackTrace" | grep -v buildvalidation | grep -v modulescript | grep -v src-test | cut -d'/' -f1-2 | sort | uniq -c

To get the full list (including code in question):

grep -IrE "System.out|System.err|printStackTrace" | grep -v buildvalidation | grep -v modulescript | grep -v src-test | cut -d'/' -f1-2 | sort | uniq -c
Review and move the logging to proper log4j usage.

While doing that check if:
- stackTrace is really wanted
- Logging is really useful (and not developer leftover)
No tags attached.
related to defect 0048091 closed mgonzalezh Modules SPLP: Several modules from functional/omni team are using bad logging (System.out,System.err println or printStackTrace) 
related to defect 0048092 closed mtaal Modules org.openbravo.reporting.tools module is using bad logging (printStackTrace) 
blocks design defect 0036162 acknowledged Triage Platform Base Openbravo ERP clean up openbravo.log 
Issue History
2021-11-03 16:28shuehnerNew Issue
2021-11-03 16:28shuehnerAssigned To => Triage Finance
2021-11-03 16:28shuehnerRelationship addedblocks 0036162
2021-11-03 16:58vmromanosNote Added: 0132816
2021-11-17 14:31vmromanosIssue cloned0048091
2021-11-17 14:31vmromanosRelationship addedrelated to 0048091
2021-11-17 14:33vmromanosNote Added: 0133153
2021-11-17 14:33vmromanosDescription Updatedbug_revision_view_page.php?rev_id=23331#r23331
2021-11-17 14:39vmromanosIssue cloned0048092
2021-11-17 14:39vmromanosRelationship addedrelated to 0048092
2021-11-17 14:41vmromanosNote Added: 0133154
2021-11-17 14:41vmromanosDescription Updatedbug_revision_view_page.php?rev_id=23332#r23332
2021-11-17 14:44vmromanosAssigned ToTriage Finance => aferraz
2022-07-26 18:29hgbotNote Added: 0139619
2022-07-26 18:39hgbotNote Added: 0139620
2022-07-26 18:55hgbotNote Added: 0139622
2022-07-27 09:51hgbotNote Added: 0139628
2022-07-27 10:05hgbotNote Added: 0139629
2022-07-27 10:08hgbotNote Added: 0139630
2022-07-27 10:14hgbotNote Added: 0139631
2022-07-27 10:32hgbotNote Added: 0139632
2022-07-27 10:58hgbotNote Added: 0139634
2022-08-02 09:24hgbotNote Added: 0139785
2022-08-02 09:24hgbotNote Added: 0139786
2022-08-02 09:25hgbotNote Added: 0139787
2022-08-02 09:25hgbotNote Added: 0139788
2022-08-02 09:26hgbotNote Added: 0139789
2022-08-02 09:26hgbotNote Added: 0139790
2022-08-02 09:28hgbotNote Added: 0139791
2022-08-02 09:28hgbotNote Added: 0139792
2022-08-02 09:29hgbotNote Added: 0139793
2022-08-02 09:29hgbotNote Added: 0139794
2022-08-02 09:59hgbotNote Added: 0139795
2022-08-02 09:59hgbotNote Added: 0139796
2022-08-02 10:00hgbotNote Added: 0139797
2022-08-02 10:00hgbotNote Added: 0139798
2022-08-02 10:01hgbotNote Added: 0139799
2022-08-02 10:01hgbotNote Added: 0139800
2022-08-02 10:02hgbotNote Added: 0139801
2022-08-02 10:02hgbotNote Added: 0139802
2022-12-16 15:33aferrazAssigned Toaferraz => francisco_ofarril
2022-12-23 19:44francisco_ofarrilStatusnew => acknowledged
2022-12-26 15:54francisco_ofarrilNote Added: 0145009
2022-12-27 16:23aferrazStatusacknowledged => scheduled
2022-12-27 16:23aferrazStatusscheduled => resolved
2022-12-27 16:23aferrazResolutionopen => fixed
2022-12-27 16:23aferrazReview Assigned To => aferraz
2022-12-27 16:23aferrazNote Added: 0145040
2022-12-27 16:23aferrazStatusresolved => closed

Notes
(0132816)
vmromanos   
2021-11-03 16:58   
Exclude pmods/org.openbravo.idl as it is a legacy module and the number of warnings is too high
(0133153)
vmromanos   
2021-11-17 14:33   
Split SPLP related issues in 0048091
(0133154)
vmromanos   
2021-11-17 14:41   
Split WMS/Reporting related issues in 0048092
(0139619)
hgbot   
2022-07-26 18:29   
Merge Request created: https://gitlab.com/openbravo/product/mods/org.openbravo.utility.multiplebpselector/-/merge_requests/1 [^]
(0139620)
hgbot   
2022-07-26 18:39   
Merge Request created: https://gitlab.com/openbravo/product/mods/org.openbravo.module.validto/-/merge_requests/1 [^]
(0139622)
hgbot   
2022-07-26 18:55   
Merge Request created: https://gitlab.com/openbravo/product/mods/org.openbravo.module.einvoice/-/merge_requests/1 [^]
(0139628)
hgbot   
2022-07-27 09:51   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.document.massinvoicing/-/merge_requests/2 [^]
(0139629)
hgbot   
2022-07-27 10:05   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.resources/-/merge_requests/4 [^]
(0139630)
hgbot   
2022-07-27 10:08   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.invoicematchingalgorithm/-/merge_requests/1 [^]
(0139631)
hgbot   
2022-07-27 10:14   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.sepa.iso20022.camt/-/merge_requests/1 [^]
(0139632)
hgbot   
2022-07-27 10:32   
Merge Request created: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt.retail/-/merge_requests/57 [^]
(0139634)
hgbot   
2022-07-27 10:58   
Merge Request created: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/merge_requests/35 [^]
(0139785)
hgbot   
2022-08-02 09:24   
Repository: https://gitlab.com/openbravo/product/mods/org.openbravo.utility.multiplebpselector [^]
Changeset: 6237b821a9069dc125870860af6242a3fdd13d8f
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 26-07-2022 18:22:40
URL: https://gitlab.com/openbravo/product/mods/org.openbravo.utility.multiplebpselector/-/commit/6237b821a9069dc125870860af6242a3fdd13d8f [^]

ISSUE-47974: Fix bad logging (System.out,printStackTrace) use log4j

- Use log4j.debug instead of System.out.println for externally passed
  c_bp_group_id
- Remove printStackTrace in error path - Fix/add log4j.error instead

---
M src/org/openbravo/utility/multiplebpselector/BusinessPartnerSelectorMULTIBP.java
---
(0139786)
hgbot   
2022-08-02 09:24   
Merge request merged: https://gitlab.com/openbravo/product/mods/org.openbravo.utility.multiplebpselector/-/merge_requests/1 [^]
(0139787)
hgbot   
2022-08-02 09:25   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.document.massinvoicing [^]
Changeset: a9abd896f9dd0d5d3f6ef6f55d604ee359608fe2
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 27-07-2022 09:50:05
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.document.massinvoicing/-/commit/a9abd896f9dd0d5d3f6ef6f55d604ee359608fe2 [^]

ISSUE-47974: Fix bad logging, use log4j instead of printStackTrace

---
M src/org/openbravo/document/massinvoicing/MassInvoicing.java
---
(0139788)
hgbot   
2022-08-02 09:25   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.document.massinvoicing/-/merge_requests/2 [^]
(0139789)
hgbot   
2022-08-02 09:26   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.resources [^]
Changeset: 7bcdb34860a24e2dde2e851d92da828edc8bd9eb
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 27-07-2022 10:04:03
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.resources/-/commit/7bcdb34860a24e2dde2e851d92da828edc8bd9eb [^]

ISSUE-47974: Fix bad logging, use log4j instead of printStackTrace

Straightforward converision, with one exception:
- CalculateOccupancy as exception handling is only for st.close() cleanup
  skip logging is as the 'ignore' variable name already intended.

---
M src/org/openbravo/module/resources/availability/AvailabilityDataSource.java
M src/org/openbravo/module/resources/background/CalculateOccupancy.java
M src/org/openbravo/module/resources/calendar/ReservationUtilities.java
---
(0139790)
hgbot   
2022-08-02 09:26   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.resources/-/merge_requests/4 [^]
(0139791)
hgbot   
2022-08-02 09:28   
Repository: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt [^]
Changeset: c3cc2e2d74c882b4ba63f4457dace7031504965e
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 27-07-2022 10:57:52
URL: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/commit/c3cc2e2d74c882b4ba63f4457dace7031504965e [^]

ISSUE-47974: Fix bad loggin, use log4j instead of printStrackTrace

---
M src/com/practicsbs/saftpt/data/ExportSaftPT.java
M src/com/practicsbs/saftpt/data/ExportSourceDocs.java
M src/com/practicsbs/saftpt/data/Utils.java
M src/com/practicsbs/saftpt/signature/ProcessInvoice.java
M src/com/practicsbs/saftpt/signature/SignGeneratedInvoices.java
M src/com/practicsbs/saftpt/validation/SaftValidateDataBaseProcess.java
M src/com/practicsbs/saftpt/war/SignDocumentsImpl.java
---
(0139792)
hgbot   
2022-08-02 09:28   
Merge request merged: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt/-/merge_requests/35 [^]
(0139793)
hgbot   
2022-08-02 09:29   
Repository: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt.retail [^]
Changeset: 1cd1aa0d39908f5143e1b061cdc6ac1dbf2292f0
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 27-07-2022 10:31:38
URL: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt.retail/-/commit/1cd1aa0d39908f5143e1b061cdc6ac1dbf2292f0 [^]

ISSUE-47974: Fix bad logging, use log4j instead of printStackTrace

---
M src/com/practicsbs/saftpt/retail/SaftrUtility.java
M src/com/practicsbs/saftpt/retail/ad_actionhandler/SaftrChangePrefixesHandler.java
M src/com/practicsbs/saftpt/retail/ad_actionhandler/SaftrUnlinkDeviceActionHandler.java
---
(0139794)
hgbot   
2022-08-02 09:29   
Merge request merged: https://gitlab.com/openbravo/product/pmods/com.practicsbs.saftpt.retail/-/merge_requests/57 [^]
(0139795)
hgbot   
2022-08-02 09:59   
Repository: https://gitlab.com/openbravo/product/mods/org.openbravo.module.einvoice [^]
Changeset: 4d080ac9f76557b57222bf96a031fad2370a58ff
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 02-08-2022 09:32:02
URL: https://gitlab.com/openbravo/product/mods/org.openbravo.module.einvoice/-/commit/4d080ac9f76557b57222bf96a031fad2370a58ff [^]

ISSUE-47974: Fix bad logging use log4j instead of printStackTrace()

Using log4j.error as usual instead of manual / bad printStackTrace

---
M src/org/openbravo/module/einvoice/ad_process/FileGeneration.java
M src/org/openbravo/module/einvoice/ad_process/Generate.java
M src/org/openbravo/module/einvoice/ad_process/GenerateAndSend.java
---
(0139796)
hgbot   
2022-08-02 09:59   
Merge request merged: https://gitlab.com/openbravo/product/mods/org.openbravo.module.einvoice/-/merge_requests/1 [^]
(0139797)
hgbot   
2022-08-02 10:00   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.invoicematchingalgorithm [^]
Changeset: f24ad05a0b71c77ecd83dd36fef2b18950072b8a
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 02-08-2022 09:33:48
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.invoicematchingalgorithm/-/commit/f24ad05a0b71c77ecd83dd36fef2b18950072b8a [^]

ISSUE-47974: Fix example of bad logging in commented code

While no functional change better to not leave exampels of bad logging
in comments. That avoid those to spread if somebody picks up and copies
the bad style.

---
M src/org/openbravo/module/invoicematchingalgorithm/algorithm/InvoiceMatchingAlgorithm.java
---
(0139798)
hgbot   
2022-08-02 10:00   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.module.invoicematchingalgorithm/-/merge_requests/1 [^]
(0139799)
hgbot   
2022-08-02 10:01   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.sepa.iso20022.camt [^]
Changeset: 7a599f31ca2829c6248f3bd39a9fcced8be51730
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 02-08-2022 09:35:38
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.sepa.iso20022.camt/-/commit/7a599f31ca2829c6248f3bd39a9fcced8be51730 [^]

ISSUE-47974: Fix bad logging, use log4j instead of printStackTrace

---
M src/org/openbravo/sepa/iso20022/camt/utility/process/Camt.java
---
(0139800)
hgbot   
2022-08-02 10:01   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.sepa.iso20022.camt/-/merge_requests/1 [^]
(0139801)
hgbot   
2022-08-02 10:02   
Repository: https://gitlab.com/openbravo/product/mods/org.openbravo.module.validto [^]
Changeset: 5c3722b67e46b2267d85fec0fbfcf412c8a63d2b
Author: Stefan Huehner <stefan.huehner@openbravo.com>
Date: 02-08-2022 09:38:11
URL: https://gitlab.com/openbravo/product/mods/org.openbravo.module.validto/-/commit/5c3722b67e46b2267d85fec0fbfcf412c8a63d2b [^]

ISSUE-47974: Fix bad logging use log4j instead of printStackTrace

- ValidToProcess let log4j.error report the stacktrace not need to do
  that manually and worse. Also change .debug into .error which looks
  more adequate for date format parsing error
- ValidToUtility two cases of same letting log4j.error log the
  stacktrace as above. In one also upgrade .debug to .error for
  consistency

---
M src/org/openbravo/module/validto/process/ValidToProcess.java
M src/org/openbravo/module/validto/process/ValidToUtility.java
---
(0139802)
hgbot   
2022-08-02 10:02   
Merge request merged: https://gitlab.com/openbravo/product/mods/org.openbravo.module.validto/-/merge_requests/1 [^]
(0145009)
francisco_ofarril   
2022-12-26 15:54   
In these modules it is already solved...

mods/org.openbravo.module.einvoice
mods/org.openbravo.module.validto
mods/org.openbravo.utility.multiplebpselector
pmods/com.practicsbs.saftpt
pmods/com.practicsbs.saftpt.retail
pmods/org.openbravo.document.massinvoicing
pmods/org.openbravo.module.invoicematchingalgorithm
pmods/org.openbravo.module.resources
pmods/org.openbravo.sepa.iso20022.camt
(0145040)
aferraz   
2022-12-27 16:23   
Fixed in every module but org.openbravo.idl as it is deprecated.