Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12719] CLI: iOS Console output prints out of order

GitHub Issuen/a
TypeSub-task
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2013-03-05T01:06:08.000+0000
Affected Version/sRelease 3.0.2
Fix Version/sRelease 3.1.0
ComponentsCLI, iOS
Labelscli-review, qe-sdk3.0.2, regression
ReporterDustin Hyde
AssigneeChris Barber
Created2013-02-13T03:39:30.000+0000
Updated2013-03-07T19:22:05.000+0000

Description

CLI: iOS Console output prints out of order. Run code in app.js:
var win = Ti.UI.createWindow({
    backgroundColor : 'blue'
});
 
var button = Ti.UI.createButton({
    title : 'click',
    top : '40%',
    bottom : '40%',
    left : '30%',
    right : '30%'
});
 
button.addEventListener('click', function() {
    console.log('console.log()');
    console.log(['arg0', 'arg1', 'arg2']);
 
    console.debug('console.debug()');
    console.debug(['arg0', 'arg1', 'arg2']);
 
    console.info('console.info()');
    console.info(['arg0', 'arg1', 'arg2']);
 
    console.warn('console.warn()');
    console.warn(['arg0', 'arg1', 'arg2']);
 
    console.error('console.error()');
    console.error(['arg0', 'arg1', 'arg2']);
 
    Ti.API.trace('Ti.API.trace()');
    Ti.API.trace(['arg0', 'arg1', 'arg2']);
 
    Ti.API.debug('Ti.API.debug([])');
    Ti.API.debug(['arg0', 'arg1', 'arg2']);
 
    Ti.API.info('Ti.API.info([])');
    Ti.API.info(['arg0', 'arg1', 'arg2']);
 
    Ti.API.warn('Ti.API.warn([])');
    Ti.API.warn(['arg0', 'arg1', 'arg2']);
 
    Ti.API.error('Ti.API.error([])');
    Ti.API.error(['arg0', 'arg1', 'arg2']);
 
    Ti.API.log('TRACE', 'Ti.API.log(TRACE)');
    Ti.API.log('TRACE', ['arg0', 'arg1', 'arg2']);
 
    Ti.API.log('DEBUG', 'Ti.API.log(DEBUG)');
    Ti.API.log('DEBUG', ['arg0', 'arg1', 'arg2']);
 
    Ti.API.log('INFO', 'Ti.API.log(INFO)');
    Ti.API.log('INFO', ['arg0', 'arg1', 'arg2']);
 
    Ti.API.log('WARN', 'Ti.API.log(WARN)');
    Ti.API.log('WARN', ['arg0', 'arg1', 'arg2']);
 
    Ti.API.log('ERROR', 'Ti.API.log(ERROR)');
    Ti.API.log('ERROR', ['arg0', 'arg1', 'arg2']);
 
    Ti.API.log('LOG', 'Ti.API.log(LOG)');
    Ti.API.log('LOG', ['arg0', 'arg1', 'arg2']);
 
    switch(Ti.Platform.osname)
    {
        case 'ipad':
        case 'iphone':
        {
            Ti.API.timestamp('Ti.API.timestamp()');
            Ti.API.timestamp(['arg0', 'arg1', 'arg2']);
        }
    }
});
 
win.add(button);
win.open(); 
Actual Result:
[INFO] :  console.log()
[DEBUG] :  console.debug()
[DEBUG] :  (
[INFO] :  (
[DEBUG] :      arg0,
[INFO] :      arg0,
[DEBUG] :      arg1,
[INFO] :      arg1,
[DEBUG] :      arg2
[INFO] :      arg2
[DEBUG] :  )
[INFO] :  )
[INFO] :  console.info()
[INFO] :  (
[INFO] :      arg0,
[INFO] :      arg1,
[INFO] :      arg2
[INFO] :  )
[WARN] :  console.warn()
[ERROR] :  console.error()
[WARN] :  (
[ERROR] :  (
[WARN] :      arg0,
[ERROR] :      arg0,
[ERROR] :      arg1,
[WARN] :      arg1,
[ERROR] :      arg2
[WARN] :      arg2
[ERROR] :  )
[WARN] :  )
[DEBUG] :  Ti.API.debug([])
[DEBUG] :  (
[TRACE] :  Ti.API.trace()
[DEBUG] :      arg0,
[TRACE] :  (
[DEBUG] :      arg1,
[DEBUG] :      arg2
[TRACE] :      arg0,
[DEBUG] :  )
[TRACE] :      arg1,
[ERROR] :  Ti.API.error([])
[TRACE] :      arg2
[ERROR] :  (
[TRACE] :  )
[ERROR] :      arg0,
[ERROR] :      arg1,
[INFO] :  Ti.API.info([])
[ERROR] :      arg2
[INFO] :  (
[ERROR] :  )
[INFO] :      arg0,
[DEBUG] :  Ti.API.log(DEBUG)
[INFO] :      arg1,
[DEBUG] :  (
[INFO] :      arg2
[DEBUG] :      arg0,
[INFO] :  )
[DEBUG] :      arg1,
[WARN] :  Ti.API.warn([])
[DEBUG] :      arg2
[WARN] :  (
[DEBUG] :  )
[WARN] :      arg0,
[WARN] :      arg1,
[WARN] :      arg2
[WARN] :  )
[TRACE] :  Ti.API.log(TRACE)
[TRACE] :  (
[TRACE] :      arg0,
[TRACE] :      arg1,
[TRACE] :      arg2
[TRACE] :  )
[INFO] :  Ti.API.log(INFO)
[INFO] :  (
[INFO] :      arg0,
[INFO] :      arg1,
[INFO] :      arg2
[INFO] :  )
[WARN] :  Ti.API.log(WARN)
[WARN] :  (
[WARN] :      arg0,
[WARN] :      arg1,
[WARN] :      arg2
[WARN] :  )
[ERROR] :  Ti.API.log(ERROR)
[ERROR] :  (
[ERROR] :      arg0,
[ERROR] :      arg1,
[ERROR] :      arg2
[ERROR] :  )
[ERROR] :  [LOG] Ti.API.log(LOG)
[ERROR] :  [LOG] (
[ERROR] :      arg0,
[ERROR] :      arg1,
[ERROR] :      arg2
[ERROR] :  )
[ERROR] :  [TIMESTAMP] 382417823.074028 Ti.API.timestamp()
[ERROR] :  [TIMESTAMP] 382417823.074065 (
[ERROR] :      arg0,
[ERROR] :      arg1,
[ERROR] :      arg2
[ERROR] :  )
Note: Colors are correct. Messages print as if they are on different threads. Works in SDK 2.1.4.

Comments

  1. Chris Barber 2013-03-05

    Dupe of TIMOB-12809.
  2. Olga Romero 2013-03-07

    Closing as TIMOB-12809 Duplicate. Verified correct output with: Titanium Studio: 3.0.2.201302191606 Titanium SDK: 3.1.0.v20130306145654 Titanium CLI: 3.0.25 OS: 10.8.2 Xcode: 4.6 iPhone Simulator: 6.1

JSON Source