[TIMOB-11618] Android: Ti.API.log: function calls with one arg (log level) do not print as the correct log level, and have some format problems
GitHub Issue | n/a |
---|---|
Type | Sub-task |
Priority | Low |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2012-10-31T18:29:44.000+0000 |
Affected Version/s | Release 2.1.3, Release 3.0.0 |
Fix Version/s | n/a |
Components | Android |
Labels | parity, qe-and100112 |
Reporter | Dustin Hyde |
Assignee | Ingo Muschenetz |
Created | 2012-10-31T00:10:17.000+0000 |
Updated | 2017-03-17T18:57:51.000+0000 |
Description
Ti.API.log console logging calls with one arg (log level) do not print as the correct log level. They all default to [INFO] instead.
This does not occur in MobileWeb. This is a parity issue.
This is also an inconsistency within the Android platform because log calls with two args work as expected.
Notice the two edge-cases as well with Ti.API.log() with no arg printing as [undefined] when it would normally be expected to be the null string, and Ti.API.log('log') with a freeform log type does not contain brackets when it normally would (see expected results for both).
Steps to Reproduce:
1. Run code:
Ti.API.log();
Ti.API.log('trace');
Ti.API.log('debug');
Ti.API.log('info');
Ti.API.log('warn');
Ti.API.log('error');
Ti.API.log('log');
Actual Result:
[INFO][TiAPI ( 327)] [undefined]
[INFO][TiAPI ( 327)] trace
[INFO][TiAPI ( 327)] debug
[INFO][TiAPI ( 327)] info
[INFO][TiAPI ( 327)] warn
[INFO][TiAPI ( 327)] error
[INFO][TiAPI ( 327)] log
Expected Result:
[INFO][TiAPI ( 327)]
[TRACE][TiAPI ( 327)] trace
[DEBUG][TiAPI ( 327)] debug
[INFO][TiAPI ( 327)] info
[WARN][TiAPI ( 327)] warn
[ERROR][TiAPI ( 327)] error
[INFO][TiAPI ( 327)] [log]
This occurs in iOS as well in TIMOB-11615 (with slight variations).
Duplicate of TIMOB-11615.
Need to revisit [undefined] log message edge case within this ticket.
Closing ticket as duplicate.