Openbravo Issue Tracking System - POS2
View Issue Details
0051095POS2Corepublic2022-12-12 10:202022-12-12 10:20
alostale 
Triage Platform Base 
normalminorhave not tried
newopen 
5
 
 
No
0051095: OB.App.State.TerminalLog.addLog does not check preferences to send log
There are 2 client APIs to handle client logs:
1. OB.* (OB.error, OB.warn, OB.info...): it checks whether the log should be printed in console and/or sent to backend as terminal log
2. OB.App.State.TerminalLog.addLog: it sends the message to the backend as terminal log without further checks

The second option is a lower level API that should not be directly used by business logic code, but there are already some parts where it is used.
N/A: this issue is technical related to code APIs.
Decide whether OB.App.State.TerminalLog.addLog should be usable from business logic code. Options:

1. Keep it as low level:
  * Review current usage from business logic code and change it to OB.*
  * Document in JSDoc it is a low level API so it shouldn't be used

2. Open it up to be usable from business logic code
  * As action preparation (?) check whether the message should be actually sent. Note this would double the checks that are already being executed in OB.*. The save parts might be moved to be executed only here.
No tags attached.
related to feature request 0050505 scheduled guillermogil Post a message in TerminalLog when a Notification is shown to the user 
Issue History
2022-12-12 10:20alostaleNew Issue
2022-12-12 10:20alostaleAssigned To => Triage Platform Base
2022-12-12 10:20alostaleTriggers an Emergency Pack => No
2022-12-12 10:20alostaleRelationship addedrelated to 0050505

There are no notes attached to this issue.