{ "id": "105044", "key": "TIMOB-11778", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15707", "description": "2013 Sprint 23", "name": "2013 Sprint 23", "archived": true, "released": true, "releaseDate": "2013-11-15" }, { "id": "15709", "description": "2013 Sprint 23 Core", "name": "2013 Sprint 23 Core", "archived": true, "released": true, "releaseDate": "2013-11-15" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-11-07T01:35:33.000+0000", "created": "2012-11-15T15:47:01.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-sdk3.0.2", "regression" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "22814", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "104209", "key": "TISTUD-2688", "fields": { "summary": "iOS: Ti.API: some console logging calls with array args do not print array to console", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "22815", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "104289", "key": "TISTUD-2698", "fields": { "summary": "Console: no colors on new lines in debug output", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2013-11-14T06:31:39.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "The new CLI is prefixing log output with {{[DEBUG]}}.\r\n\r\nThe cases are:\r\n{code}\r\nTi.API.log('unknown_level', ...)\r\n{code}\r\nand \r\n{code}\r\nTi.API.timestamp(...)\r\n{code}\r\n\r\n\r\nSteps to Reproduce:\r\n\r\n1. Run code:\r\n\r\n{code}\r\nTi.API.log('LOG', 'Ti.API.log LOG');\r\nTi.API.log('LOG', ['Ti.API.log LOG', 'ARG1', 'ARG2']);\r\n \r\nif(Ti.Platform.osname == 'iphone' || Ti.Platform.osname == 'ipad')\r\n{\r\n Ti.API.timestamp('Ti.API TIMESTAMP');\r\n Ti.API.timestamp(['Ti.API TIMESTAMP', 'ARG1', 'ARG2']);\r\n}\r\n{code}\r\n\r\nActual Result:\r\n\r\n{code}\r\n[DEBUG] [LOG] Ti.API.log LOG\r\n[DEBUG] [LOG] (\r\n[DEBUG] \"Ti.API.log LOG\",\r\n[DEBUG] ARG1,\r\n[DEBUG] ARG2\r\n[DEBUG] ) \r\n[DEBUG] [TIMESTAMP] 374602955.638459 Ti.API TIMESTAMP\r\n[DEBUG] [TIMESTAMP] 374602955.638546 (\r\n[DEBUG] \"Ti.API TIMESTAMP\",\r\n[DEBUG] ARG1,\r\n[DEBUG] ARG2\r\n[DEBUG] ) \r\n{code}\r\n\r\nExpected Result:\r\n\r\n{code}\r\n[LOG] Ti.API.log LOG\r\n[LOG] (\r\n \"Ti.API.log LOG\",\r\n ARG1,\r\n ARG2\r\n)\r\n[TIMESTAMP] 374624326.619975 Ti.API TIMESTAMP\r\n[TIMESTAMP] 374624326.620025 (\r\n \"Ti.API TIMESTAMP\",\r\n ARG1,\r\n ARG2\r\n)\r\n{code}\r\n\r\nI would expect timestamp to print as INFO, or a custom TIMESTAMP (if possible).\r\n", "attachment": [], "flagged": false, "summary": "iOS: Ti.API: console.log and console.timestamp output prefixed with [ERROR] depending on previous message", "creator": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium SDK: 3.0.0.v20121030114615\r\nTitanium Studio: 3.0.0.201210291448\r\n\r\nTitanium CLI Version: 3.0.16\r\n\r\nHost OS: Mac OS X Mountain Lion 10.8.2\r\niOS Devices Tested: iPhone Simulator 6.0", "comment": { "comments": [ { "id": "238314", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Now the timestamp (and freeform 'LOG') is printed as ERROR.\n\n{code}\n[ERROR] : [LOG] Ti.API.log(LOG)\n[ERROR] : [LOG] (\n[ERROR] : arg0,\n[ERROR] : arg1,\n[ERROR] : arg2\n[ERROR] : )\n[ERROR] : [TIMESTAMP] 382417823.074028 Ti.API.timestamp()\n[ERROR] : [TIMESTAMP] 382417823.074065 (\n[ERROR] : arg0,\n[ERROR] : arg1,\n[ERROR] : arg2\n[ERROR] : )\n{code}\n\nTitanium Studio: 3.0.2.201302081641\nTitanium SDK: 3.0.2.v20130207164659\nTitanium CLI: 3.0.23\nOS: 10.8.2\nXcode: 4.6\niPhone Simulator: 6.1", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-13T03:43:04.000+0000", "updated": "2013-02-13T03:43:04.000+0000" }, { "id": "238320", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It seems the log level is dependent on if there is an array argument.\r\n\r\nConsole calls without an array argument log to ERROR (incorrect).\r\nConsole calls with an array argument, if called directly after, log to ERROR (incorrect).\r\nConsole calls with an array argument, if called separately, log to INFO (correct).\r\n\r\nSee Sample Code:\r\n\r\n{code}\r\nTi.API.log('custom', ['arg0', 'arg1']);\r\nTi.API.log('custom');\r\nTi.API.log('custom', ['arg0, arg1']);\r\n{code}\r\n\r\nOutput:\r\n\r\n{code}\r\n[INFO] : \b\b \bcustom\r\n[DEBUG] : \b\b \b[CUSTOM] (\r\n[INFO] : \b\b \b[CUSTOM] (\r\n[DEBUG] : \b\b \b arg0,\r\n[INFO] : \b\b \b \"arg0, arg1\"\r\n[DEBUG] : \b\b \b arg1\r\n[INFO] : \b\b \b)\r\n[DEBUG] : \b\b \b)\r\n{code}\r\n\r\nRegression. Works in 2.1.4.", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-13T05:34:39.000+0000", "updated": "2013-02-13T05:47:38.000+0000" }, { "id": "278351", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Pull request: https://github.com/appcelerator/titanium_mobile/pull/4919", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-11-06T02:00:02.000+0000", "updated": "2013-11-06T02:00:02.000+0000" }, { "id": "279507", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified with test environment:\r\n\r\nAppcelerator Studio: 3.2.0.201311122338\r\nSDK:3.2.0.v20131113183932\r\nalloy: 1.3.0\r\nacs: 1.0.7\r\nnpm: 1.3.2\r\ntitanium: 3.2.0\r\ntitanium-code-processor: 1.1.0\r\nXcode:5.0.2\r\nDevice: Iphone 5s(v7.0.2)\r\nOS: Mac OSX 10.9\r\n\r\n{code}\r\nTi.API.log('LOG', 'Ti.API.log LOG');\r\nTi.API.log('LOG', ['Ti.API.log LOG', 'ARG1', 'ARG2']);\r\n \r\nif(Ti.Platform.osname == 'iphone' || Ti.Platform.osname == 'ipad')\r\n{\r\n Ti.API.timestamp('Ti.API TIMESTAMP');\r\n Ti.API.timestamp(['Ti.API TIMESTAMP', 'ARG1', 'ARG2']);\r\n}\r\n{code}\r\n\r\nResult as expected:\r\n\r\n[LOG] Ti.API.log LOG\r\n[LOG] (\r\n \"Ti.API.log LOG\",\r\n ARG1,\r\n ARG2\r\n)\r\n[TIMESTAMP] 406103132.967310 Ti.API TIMESTAMP\r\n[TIMESTAMP] 406103132.968250 (\r\n \"Ti.API TIMESTAMP\",\r\n ARG1,\r\n ARG2\r\n)\r\n\r\nClosing as verified and getting expected result.", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-14T06:31:39.000+0000", "updated": "2013-11-14T06:31:39.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }