[TIMOB-11630] iOS: console logging with array arg displays on multiple lines, should be one line
GitHub Issue | n/a |
---|---|
Type | Sub-task |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 3.0.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | cb-tooling, parity, qe-ios100112 |
Reporter | Dustin Hyde |
Assignee | Unknown |
Created | 2012-11-01T20:01:50.000+0000 |
Updated | 2018-02-28T20:03:48.000+0000 |
Description
iOS console logging functions called with array argument display on multiple lines. The other platforms all display on the same line.
Steps to Reproduce:
1. Run code:
/* console */
if(Ti.Platform.osname != 'android') // TIMOB-11294 - Android: console: log functions fail in commonjs require
{
console.log('console LOG');
console.log(['console LOG', 'ARG1', 'ARG2']);
console.debug('console DEBUG');
console.debug(['console DEBUG', 'ARG1', 'ARG2']);
console.info('console INFO');
console.info(['console INFO', 'ARG1', 'ARG2']);
console.warn('console WARN');
console.warn(['console WARN', 'ARG1', 'ARG2']);
console.error('console ERROR');
console.error(['console ERROR', 'ARG1', 'ARG2']);
}
/* Ti.API */
Ti.API.trace('Ti.API TRACE');
Ti.API.trace(['Ti.API TRACE', 'ARG1', 'ARG2']);
Ti.API.debug('Ti.API DEBUG');
Ti.API.debug(['Ti.API DEBUG', 'ARG1', 'ARG2']);
Ti.API.info('Ti.API INFO');
Ti.API.info(['Ti.API INFO', 'ARG1', 'ARG2']);
Ti.API.warn('Ti.API WARN');
Ti.API.warn(['Ti.API WARN', 'ARG1', 'ARG2']);
Ti.API.error('Ti.API ERROR');
Ti.API.error(['Ti.API ERROR', 'ARG1', 'ARG2']);
/* Ti.API.log */
Ti.API.log('TRACE', 'Ti.API.log TRACE');
Ti.API.log('TRACE', ['Ti.API.log TRACE', 'ARG1', 'ARG2']);
Ti.API.log('DEBUG', 'Ti.API.log DEBUG');
Ti.API.log('DEBUG', ['Ti.API.log DEBUG', 'ARG1', 'ARG2']);
Ti.API.log('INFO', 'Ti.API.log INFO');
Ti.API.log('INFO', ['Ti.API.log INFO', 'ARG1', 'ARG2']);
Ti.API.log('WARN', 'Ti.API.log WARN');
Ti.API.log('WARN', ['Ti.API.log WARN', 'ARG1', 'ARG2']);
Ti.API.log('ERROR', 'Ti.API.log ERROR');
Ti.API.log('ERROR', ['Ti.API.log ERROR', 'ARG1', 'ARG2']);
Ti.API.log('LOG', 'Ti.API.log LOG');
Ti.API.log('LOG', ['Ti.API.log LOG', 'ARG1', 'ARG2']);
/* Ti.iOS.API */
if(Ti.Platform.osname == 'iphone' || Ti.Platform.osname == 'ipad')
{
Ti.API.timestamp('Ti.API TIMESTAMP');
Ti.API.timestamp(['Ti.API TIMESTAMP', 'ARG1', 'ARG2']);
}
Actual Result:
[INFO] console LOG
[INFO] (
"console LOG",
ARG1,
ARG2
)
[DEBUG] console DEBUG
[DEBUG] (
"console DEBUG",
ARG1,
ARG2
)
[INFO] console INFO
[INFO] (
"console INFO",
ARG1,
ARG2
)
[WARN] console WARN
[WARN] (
"console WARN",
ARG1,
ARG2
)
[ERROR] console ERROR
[ERROR] (
"console ERROR",
ARG1,
ARG2
)
[DEBUG] Ti.API DEBUG
[DEBUG] (
"Ti.API DEBUG",
ARG1,
ARG2
)
[INFO] Ti.API INFO
[INFO] (
"Ti.API INFO",
ARG1,
ARG2
)
[WARN] Ti.API WARN
[WARN] (
"Ti.API WARN",
ARG1,
ARG2
)
[ERROR] Ti.API ERROR
[ERROR] (
"Ti.API ERROR",
ARG1,
ARG2
)
[DEBUG] Ti.API.log DEBUG
[DEBUG] (
"Ti.API.log DEBUG",
ARG1,
ARG2
)
[INFO] Ti.API.log INFO
[INFO] (
"Ti.API.log INFO",
ARG1,
ARG2
)
[WARN] Ti.API.log WARN
[WARN] (
"Ti.API.log WARN",
ARG1,
ARG2
)
[ERROR] Ti.API.log ERROR
[ERROR] (
"Ti.API.log ERROR",
ARG1,
ARG2
)
[LOG] Ti.API.log LOG
[LOG] (
[TIMESTAMP] 373491805.567042 Ti.API TIMESTAMP
[TIMESTAMP] 373491805.567080 (
Expected Result (Android):
[INFO][TiAPI ( 425)] Ti.API INFO
[INFO][TiAPI ( 425)] Ti.API INFO,ARG1,ARG2
[WARN][TiAPI ( 425)] Ti.API WARN
[WARN][TiAPI ( 425)] Ti.API WARN,ARG1,ARG2
[ERROR][TiAPI ( 425)] Ti.API ERROR
[ERROR][TiAPI ( 425)] Ti.API ERROR,ARG1,ARG2
[INFO][TiAPI ( 425)] Ti.API.log INFO
[INFO][TiAPI ( 425)] Ti.API.log INFO,ARG1,ARG2
[WARN][TiAPI ( 425)] Ti.API.log WARN
[WARN][TiAPI ( 425)] Ti.API.log WARN,ARG1,ARG2
[ERROR][TiAPI ( 425)] Ti.API.log ERROR
[ERROR][TiAPI ( 425)] Ti.API.log ERROR,ARG1,ARG2
[INFO][TiAPI ( 425)] [LOG] Ti.API.log LOG
[INFO][TiAPI ( 425)] [LOG] Ti.API.log LOG,ARG1,ARG2
Note this would prevent TIMOB-11617 - iOS: Ti.API: some console logging calls with array args do not print array to console.