Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12718] CLI: iOS Console Output missing first arg of some arrays

GitHub Issuen/a
TypeSub-task
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2013-03-05T01:08:43.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:34:43.000+0000
Updated2013-03-07T19:30:15.000+0000

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.

Comments

  1. Chris Barber 2013-03-05

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

    Verified correct output: [INFO] :   console LOG [DEBUG] :  console DEBUG [INFO] :   ( [INFO] :   "console LOG", [INFO] :   ARG1, [INFO] :   ARG2 [INFO] :   ) [INFO] :   console INFO [INFO] :   ( [INFO] :   "console INFO", [INFO] :   ARG1, [INFO] :   ARG2 [INFO] :   ) [WARN] :   console WARN [WARN] :   ( [WARN] :   "console WARN", [WARN] :   ARG1, [WARN] :   ARG2 [WARN] :   ) [TRACE] :  Ti.API TRACE [TRACE] :  ( [TRACE] :   "Ti.API TRACE", [TRACE] :   ARG1, [TRACE] :   ARG2 [TRACE] :  ) [DEBUG] :  ( [DEBUG] :   "console DEBUG", [DEBUG] :   ARG1, [DEBUG] :   ARG2 [DEBUG] :  ) [ERROR] :  console ERROR [ERROR] :  ( [ERROR] :   "console ERROR", [ERROR] :   ARG1, [ERROR] :   ARG2 [ERROR] :  ) [DEBUG] :  Ti.API DEBUG [DEBUG] :  ( [DEBUG] :   "Ti.API DEBUG", [DEBUG] :   ARG1, [DEBUG] :   ARG2 [DEBUG] :  ) [INFO] :   Ti.API INFO [INFO] :   ( [INFO] :   "Ti.API INFO", [INFO] :   ARG1, [INFO] :   ARG2 [INFO] :   ) [WARN] :   Ti.API WARN [WARN] :   ( [WARN] :   "Ti.API WARN", [WARN] :   ARG1, [WARN] :   ARG2 [WARN] :   ) [ERROR] :  Ti.API ERROR [ERROR] :  ( [ERROR] :   "Ti.API ERROR", [ERROR] :   ARG1, [ERROR] :   ARG2 [ERROR] :  ) [TRACE] :  Ti.API.log TRACE [TRACE] :  ( [TRACE] :   "Ti.API.log TRACE", [TRACE] :   ARG1, [TRACE] :   ARG2 [TRACE] :  ) [DEBUG] :  Ti.API.log DEBUG [DEBUG] :  ( [DEBUG] :   "Ti.API.log DEBUG", [DEBUG] :   ARG1, [DEBUG] :   ARG2 [DEBUG] :  ) [INFO] :   Ti.API.log INFO [INFO] :   ( [INFO] :   "Ti.API.log INFO", [INFO] :   ARG1, [INFO] :   ARG2 [INFO] :   ) [WARN] :   Ti.API.log WARN [WARN] :   ( [WARN] :   "Ti.API.log WARN", [WARN] :   ARG1, [WARN] :   ARG2 [WARN] :   ) [ERROR] :  Ti.API.log ERROR [ERROR] :  ( [ERROR] :   "Ti.API.log 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] 384377050.797376 Ti.API TIMESTAMP [ERROR] :  [TIMESTAMP] 384377050.797424 ( [ERROR] :   "Ti.API TIMESTAMP", [ERROR] :   ARG1, [ERROR] :   ARG2 [ERROR] :  ) 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