Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Medium
    • Resolution: Duplicate
    • Affects Version/s: Release 3.0.2
    • Fix Version/s: Release 3.1.0
    • Component/s: CLI, iOS
    • Environment:

      Titanium Studio: 3.0.2.201302081641
      Titanium SDK: 3.0.2.v20130207164659
      Titanium CLI: 3.0.23
      OS: 10.8.2
      Xcode: 4.6
      iPhone Simulator: 6.1

      Description

      CLI: iOS Console Output missing first arg of some arrays.

      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 */
       
      	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']);
      	}
      });
       
      win.add(button);
      win.open(); 
      

      Actual Result:

      [INFO] :  console LOG
      [DEBUG] :  console DEBUG
      [INFO] :  (
      [INFO] :      "console LOG",
      [INFO] :      ARG1,
      [INFO] :      ARG2
      [INFO] :  )
      [INFO] :  console INFO
      [INFO] :  (
      [INFO] :  ",
      [INFO] :      ARG1,
      [INFO] :      ARG2
      [INFO] :  )
      [WARN] :  console WARN
      [WARN] :  (
      [WARN] :  ",
      [WARN] :      ARG1,
      [WARN] :      ARG2
      [WARN] :  )
      [DEBUG] :  (
      [DEBUG] :  ",
      [DEBUG] :      ARG1,
      [DEBUG] :      ARG2
      [DEBUG] :  )
      [TRACE] :  Ti.API TRACE
      [TRACE] :  (
      [TRACE] :  ",
      [ERROR] :  console ERROR
      [TRACE] :      ARG1,
      [ERROR] :  (
      [ERROR] :  ",
      [ERROR] :      ARG1,
      [TRACE] :      ARG2
      [ERROR] :      ARG2
      [ERROR] :  )
      [TRACE] :  )
      [DEBUG] :  Ti.API DEBUG
      [DEBUG] :  (
      [DEBUG] :  ",
      [DEBUG] :      ARG1,
      [DEBUG] :      ARG2
      [DEBUG] :  )
      [INFO] :  Ti.API INFO
      [INFO] :  (
      [INFO] :  ",
      [INFO] :      ARG1,
      [INFO] :      ARG2
      [INFO] :  )
      [WARN] :  Ti.API WARN
      [WARN] :  (
      [WARN] :  ",
      [WARN] :      ARG1,
      [WARN] :      ARG2
      [WARN] :  )
      [ERROR] :  Ti.API ERROR
      [ERROR] :  (
      [ERROR] :  ",
      [ERROR] :      ARG1,
      [ERROR] :      ARG2
      [ERROR] :  )
      [TRACE] :  Ti.API.log TRACE
      [TRACE] :  (
      [TRACE] :  ",
      [TRACE] :      ARG1,
      [TRACE] :      ARG2
      [TRACE] :  )
      [DEBUG] :  Ti.API.log DEBUG
      [DEBUG] :  (
      [DEBUG] :  ",
      [DEBUG] :      ARG1,
      [DEBUG] :      ARG2
      [DEBUG] :  )
      [INFO] :  Ti.API.log INFO
      [INFO] :  (
      [INFO] :  ",
      [INFO] :      ARG1,
      [INFO] :      ARG2
      [INFO] :  )
      [WARN] :  Ti.API.log WARN
      [WARN] :  (
      [WARN] :  ",
      [WARN] :      ARG1,
      [WARN] :      ARG2
      [WARN] :  )
      [ERROR] :  Ti.API.log ERROR
      [ERROR] :  (
      [ERROR] :  ",
      [ERROR] :      ARG1,
      [ERROR] :      ARG2
      [ERROR] :  )
      [ERROR] :  [LOG] Ti.API.log LOG
      [ERROR] :  [LOG] (
      [ERROR] :      "Ti.API.log LOG",
      [ERROR] :      ARG1,
      [ERROR] :      ARG2
      [ERROR] :  )
      [ERROR] :  [TIMESTAMP] 382418856.443562 Ti.API TIMESTAMP
      [ERROR] :  [TIMESTAMP] 382418856.443617 (
      [ERROR] :      "Ti.API TIMESTAMP",
      [ERROR] :      ARG1,
      [ERROR] :      ARG2
      [ERROR] :  )
      

      Note: Colors are correct. The main problem this ticket addresses is the missing first argument on many console calls, such as with Ti.API.info().

      This works in SDK 2.1.4.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cbarber Chris Barber
                Reporter:
                dhyde Dustin Hyde
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-15628
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration