[TIMOB-11615] iOS: Ti.API.log: function calls with one arg (log level) do not print as the correct log level
GitHub Issue | n/a |
---|---|
Type | Sub-task |
Priority | Low |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2012-10-31T21:14:02.000+0000 |
Affected Version/s | Release 2.1.3, Release 3.0.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | parity, qe-ios100112 |
Reporter | Dustin Hyde |
Assignee | Ingo Muschenetz |
Created | 2012-10-30T23:54:59.000+0000 |
Updated | 2017-03-21T18:16:24.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 iOS platform because log with two args works as expected, as does calling Ti.API.log() and Ti.API.log('info').
Steps to Reproduce:
1. Run code:
Ti.API.log('trace');
Ti.API.log('debug');
Ti.API.log('warn');
Ti.API.log('error');
Ti.API.log('log');
Actual Result:
[INFO] trace
[INFO] debug
[INFO] warn
[INFO] error
[INFO] log
Expected Result:
[TRACE] trace
[DEBUG] debug
[WARN] warn
[ERROR] error
[LOG] log
MobileWeb should do what iOS is doing.
This is the correct behavior, if MobileWeb is showing the opposite we need a separate ticket.
Note that though this is the 'correct' behavior, the first argument to this function is supposed to be the log level, so passing in only the log level is expected to result in a message being logged at that level. Currently if there is one argument, it is treated as the second argument and is used to populate the message instead.
To put this into context, here is a sample output w/code: Code:
Output:
Closing ticket as the issue will not fix.