Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0047963Openbravo ERPA. Platformpublic2021-11-03 13:172021-11-04 10:16
shuehner 
alostale 
normalminorhave not tried
closedfixed 
5
 
PR22Q1 
Core
No
0047963: HostNameTask should not use System.out.println,System.err.println, printStackTrace for its output
That custom ant task is not using log4j at all but all of:
- System.out.println
- System.err.println
- e.printStackTrace

The comment explaining the reason:

      // using System.out instead of log4j to be able to run this tasks without
      // having compiled defined appenders

is most likely obsolete. As custom compiled appenders from Openbravo where removed with the "MMC Rebuild/Restart removal" project.

Today that code should be able to just use log4j and avoid being a bad example.
https://gitlab.com/openbravo/product/openbravo/-/commit/893bc475e92232ed0e71aee050848dab458d62e8#320d411275551c3035b76c3ab909e6c86a0b53e7_116_139 [^]
Either
a.) Remove the if/else block having the System.out.println in connection cannot be null
b.) if that is not possible change it to proper log4j error usage
No tags attached.
related to feature request 0044269 closed alostale remove GUI rebuild+restart from MMC 
blocks design defect 0036162 acknowledged Triage Platform Base clean up openbravo.log 
Issue History
2021-11-03 13:17shuehnerNew Issue
2021-11-03 13:17shuehnerAssigned To => platform
2021-11-03 13:17shuehnerModules => Core
2021-11-03 13:17shuehnerTriggers an Emergency Pack => No
2021-11-03 13:17shuehnerIssue generated from0047962
2021-11-03 13:17shuehnerRelationship addedblocks 0036162
2021-11-04 08:07alostaleRelationship addedrelated to 0044269
2021-11-04 08:19hgbotNote Added: 0132824
2021-11-04 08:32alostaleStatusnew => scheduled
2021-11-04 08:32alostaleAssigned Toplatform => alostale
2021-11-04 10:16hgbotResolutionopen => fixed
2021-11-04 10:16hgbotStatusscheduled => closed
2021-11-04 10:16hgbotNote Added: 0132829
2021-11-04 10:16hgbotFixed in Version => PR22Q1
2021-11-04 10:16hgbotNote Added: 0132830

Notes
(0132824)
hgbot   
2021-11-04 08:19   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/449 [^]
(0132829)
hgbot   
2021-11-04 10:16   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/449 [^]
(0132830)
hgbot   
2021-11-04 10:16   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: ed2b66b7eed01407428c97e2806a839d742947f8
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2021-11-04T08:14:56+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/ed2b66b7eed01407428c97e2806a839d742947f8 [^]

fixed ISSUE-47963: HostNameTask logs directly to stdout

Changed to use log4j instead.

---
M src/org/openbravo/base/session/HostNameTask.java
---