{ "id": "89173", "key": "TIMOB-8424", "fields": { "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2020-01-08T18:31:44.000+0000", "created": "2012-03-29T13:49:50.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "qe-sdk3.0.2" ], "versions": [ { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" } ], "issuelinks": [ { "id": "22466", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "101316", "key": "TIMOB-11294", "fields": { "summary": "Android: console: log functions fail in commonjs require", "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": null, "updated": "2020-01-08T18:31:44.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": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "Currently, Ti.API defines several redundant logging methods. These include:\r\n\r\nTi.API.notice -- duplicates Ti.API.info but with a less-obvious name\r\nTi.API.critical, Ti.API.fatal -- duplicate Ti.API.error\r\n\r\nWe need a larger discussion to lay out how logging should work and look like across all platforms.\r\n\r\nSample Code:\r\n\r\n{code}\r\n/* console */\r\n\r\nconsole.log();\r\nconsole.log('console.log');\r\nconsole.log(['console.log.0', 'console.log.1']);\r\n\r\nconsole.debug();\r\nconsole.debug('console.debug');\r\nconsole.debug(['console.debug.0', 'console.debug.1']);\r\n\r\nconsole.info();\r\nconsole.info('console.info');\r\nconsole.info(['console.info.0', 'console.info.1']);\r\n\r\nconsole.warn();\r\nconsole.warn('console.warn');\r\nconsole.warn(['console.warn.0', 'console.warn.1']);\r\n\r\nconsole.error();\r\nconsole.error('console.error');\r\nconsole.error(['console.error.0', 'console.error.1']);\r\n\r\n/* Ti.API */\r\n\r\nTi.API.trace();\r\nTi.API.trace('Ti.API.trace');\r\nTi.API.trace(['Ti.API.trace.0', 'Ti.API.trace.1']);\r\n\r\nTi.API.debug();\r\nTi.API.debug('Ti.API.debug');\r\nTi.API.debug(['Ti.API.debug.0', 'Ti.API.debug.1']);\r\n\r\nTi.API.info();\r\nTi.API.info('Ti.API.info');\r\nTi.API.info(['Ti.API.info.0', 'Ti.API.info.1']);\r\n\r\nTi.API.warn();\r\nTi.API.warn('Ti.API.warn');\r\nTi.API.warn(['Ti.API.warn.0', 'Ti.API.warn.1']);\r\n\r\nTi.API.error();\r\nTi.API.error('Ti.API.error');\r\nTi.API.error(['Ti.API.error.0', 'Ti.API.error.1']);\r\n\r\n/* Ti.API.log */\r\n\r\nTi.API.log();\r\n\r\nTi.API.log('trace');\r\nTi.API.log('trace', 'Ti.API.log.trace');\r\nTi.API.log('trace', ['Ti.API.trace.0', 'Ti.API.trace.1']);\r\n\r\nTi.API.log('debug');\r\nTi.API.log('debug', 'Ti.API.log.debug');\r\nTi.API.log('debug', ['Ti.API.debug.0', 'Ti.API.debug.1']);\r\n\r\nTi.API.log('info');\r\nTi.API.log('info', 'Ti.API.log.info');\r\nTi.API.log('info', ['Ti.API.info.0', 'Ti.API.info.1']);\r\n\r\nTi.API.log('warn');\r\nTi.API.log('warn', 'Ti.API.log.warn');\r\nTi.API.log('warn', ['Ti.API.warn.0', 'Ti.API.warn.1']);\r\n\r\nTi.API.log('error');\r\nTi.API.log('error', 'Ti.API.log.error');\r\nTi.API.log('error', ['Ti.API.error.0', 'Ti.API.error.1']);\r\n\r\nTi.API.log('log');\r\nTi.API.log('log', 'Ti.API.log.log');\r\nTi.API.log('log', ['Ti.API.log.0', 'Ti.API.log.1']);\r\n\r\n/* Ti.iOS.API */\r\n\r\nif(Ti.Platform.osname == 'iphone' || Ti.Platform.osname == 'ipad')\r\n{\r\n\tTi.API.timestamp();\r\n\tTi.API.timestamp('Ti.API.timestamp');\r\n\tTi.API.timestamp(['Ti.API.timestamp.0', 'Ti.API.timestamp.1']);\r\n\t\r\n\tTi.API.log('timestamp');\r\n\tTi.API.log('timestamp', 'Ti.API.log.timestamp');\r\n\tTi.API.log('timestamp', ['Ti.API.timestamp.0', 'Ti.API.timestamp.1']);\r\n}\r\n{code}\r\n\r\nSample Test App with Buttons:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : 'blue',\r\n\tlayout : 'vertical'\r\n});\r\n\r\nvar con = Ti.UI.createButton({title:'console', height : '20%', width : '80%'});\r\nvar api = Ti.UI.createButton({title:'api', height : '20%', width : '80%'});\r\nvar log = Ti.UI.createButton({title:'log', height : '20%', width : '80%'});\r\nvar all = Ti.UI.createButton({title:'all', height : '20%', width : '80%'});\r\nvar array = Ti.UI.createButton({title:'array', height : '20%', width : '80%'});\r\n\r\ncon.addEventListener('click', function(){\r\n\tconsole.trace('console.trace');\r\n\tconsole.debug('console.debug');\r\n\tconsole.info('console.info');\r\n\tconsole.warn('console.warn');\r\n\tconsole.error('console.error');\r\n});\r\n\r\napi.addEventListener('click', function(){\r\n\tTi.API.trace('Ti.API.trace');\r\n\tTi.API.debug('Ti.API.debug');\r\n\tTi.API.info('Ti.API.info');\r\n\tTi.API.warn('Ti.API.warn');\r\n\tTi.API.error('Ti.API.error');\r\n});\r\n\r\nlog.addEventListener('click', function(){\r\n\tTi.API.log('trace', 'Ti.API.log(trace)');\r\n\tTi.API.log('debug', 'Ti.API.log(debug)');\r\n\tTi.API.log('info', 'Ti.API.log(info)');\r\n\tTi.API.log('warn', 'Ti.API.log(warn)');\r\n\tTi.API.log('error', 'Ti.API.log(error)');\r\n\tTi.API.log('custom', 'Ti.API.log(custom)');\r\n\tTi.API.log('custom', ['Ti.API.log(custom, [])', 'arg1', 'arg2']);\r\n});\r\n\r\nall.addEventListener('click', function(){\r\n\tcon.fireEvent('click');\r\n\tapi.fireEvent('click');\r\n\tlog.fireEvent('click');\r\n\t\r\n\tswitch(Ti.Platform.osname)\r\n\t{\r\n\t\tcase 'iphone':\r\n\t\tcase 'ipad': Ti.API.timestamp();\r\n\t}\r\n});\r\n\r\narray.addEventListener('click', function(){\r\n\tvar a = ['long string', 0, 'pig', 'goat', 'BIGCAPS', 999, '000', 'TWO GO'];\r\n\t\r\n\tconsole.info(a);\r\n\tTi.API.info(a);\r\n\tTi.API.log('custom', a);\r\n\t\r\n\tswitch(Ti.Platform.osname)\r\n\t{\r\n\t\tcase 'iphone':\r\n\t\tcase 'ipad': Ti.API.timestamp(a);\r\n\t}\r\n});\r\n\r\nwin.add(con);\r\nwin.add(api);\r\nwin.add(log);\r\nwin.add(all);\r\nwin.add(array);\r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Ti API: Define cross platform logging API", "creator": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [ { "id": "103710", "key": "TIMOB-11551", "fields": { "summary": "iOS: API.log with timestamp arg fails to log timestamp", "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": "Medium", "id": "3" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "104176", "key": "TIMOB-11615", "fields": { "summary": "iOS: Ti.API.log: function calls with one arg (log level) do not print as the correct log level", "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": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "104181", "key": "TIMOB-11618", "fields": { "summary": "Android: Ti.API.log: function calls with one arg (log level) do not print as the correct log level, and have some format problems", "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": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "104186", "key": "TIMOB-11619", "fields": { "summary": "Android: Ti.API: console logging calls with no arg do not print at all", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "104180", "key": "TIMOB-11617", "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": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "104175", "key": "TIMOB-11614", "fields": { "summary": "iOS: console logging functions with no args print as null", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "104169", "key": "TIMOB-11613", "fields": { "summary": "MobileWeb: console: js logging functions do not log with any log level", "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": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "104166", "key": "TIMOB-11612", "fields": { "summary": "MobileWeb: console: js logging functions with no arg do not log to console at all", "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": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "97852", "key": "TIMOB-10108", "fields": { "summary": "MobileWeb: Ti.API.log INFO level messages do not display as correct type", "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": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "84747", "key": "TIMOB-7106", "fields": { "summary": "Android: API Debug - Internal Titanium code is exposed through Ti.API.debug() method", "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": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "89172", "key": "TIMOB-8423", "fields": { "summary": "MobileWeb: Add trace(), notice(), fatal(), and critical() to Ti.API", "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": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "104276", "key": "TIMOB-11630", "fields": { "summary": "iOS: console logging with array arg displays on multiple lines, should be one line", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "109644", "key": "TIMOB-12718", "fields": { "summary": "CLI: iOS Console Output missing first arg of some arrays", "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": "Medium", "id": "3" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "109645", "key": "TIMOB-12719", "fields": { "summary": "CLI: iOS Console output prints out of order", "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": "Medium", "id": "3" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "108451", "key": "TIMOB-12403", "fields": { "summary": "SDK Console: log messages are incorrect capitalization", "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": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "102526", "key": "TIMOB-11234", "fields": { "summary": "iOS: Device Debugger: Titanium SDK log messages print out of order", "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": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "102529", "key": "TIMOB-11236", "fields": { "summary": "iOS: Titanium SDK logs all print at warning level in Xcode console", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "104348", "key": "TIMOB-11769", "fields": { "summary": "CLI: colors, lines, and messages ill-formatted with CLI enabled", "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": "Medium", "id": "3" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "86106", "key": "TIMOB-7549", "fields": { "summary": "MobileWeb: Strip console.* and Ti.API.* log calls during production builds", "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": "Low", "id": "4" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } ], "reporter": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "192657", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Not sure we should deprecate them now that they are properly documented. I'm adding them to mobile web for parity's sake. If they get ripped out, then they get ripped out.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-04-25T15:18:35.000+0000", "updated": "2012-04-25T15:18:35.000+0000" }, { "id": "192660", "author": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "body": "Before we make any changes to the API, a larger discussion is required to determine exactly what it should look like. If the API is changing, it should change once. Cross platform logging semantics should be defined in a requirements discussion before any development occurs.\r\n\r\nUpdating this ticket to represent the need for a larger cross platform logging definition.\r\n", "updateAuthor": { "name": "opiecyrus", "key": "opiecyrus", "displayName": "Opie Cyrus", "active": true, "timeZone": "America/Chicago" }, "created": "2012-04-25T15:22:32.000+0000", "updated": "2012-04-25T15:22:32.000+0000" }, { "id": "225609", "author": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Remember to consider TIMOB-11551 (iOS: API.log with timestamp arg fails to log timestamp) during the resolution of this issue.", "updateAuthor": { "name": "dhyde", "key": "dhyde", "displayName": "Dustin Hyde", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-10-30T22:55:03.000+0000", "updated": "2012-10-30T22:55:03.000+0000" }, { "id": "453511", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Pretty sure this was cleaned up years ago, as the mentioned methods don't exist ", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2020-01-08T18:31:44.000+0000", "updated": "2020-01-08T18:31:44.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }