{ "id": "165190", "key": "TIMOB-24280", "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": [], "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2017-01-20T11:07:39.000+0000", "created": "2017-01-05T12:01:51.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "console" ], "versions": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" }, { "id": "18154", "name": "Release 6.0.1", "archived": false, "released": true, "releaseDate": "2016-12-21" } ], "issuelinks": [ { "id": "53889", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "165196", "key": "TIMOB-24278", "fields": { "summary": "iOS: CLI - Console logs align to left even when logging object properties and subproperties", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-24T18:59:52.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": "Note that this is a small issue!\r\n\r\nIf the initial name of a object property starts with a substring that is similar to the log level, it cuts it's initial words\r\n\r\n{code:java}\r\n[INFO] : SELECT 'appcelerator' as infomation, 'appcelerator' as logical, 'appcelerator' as warning\r\n{code}\r\n\r\nWill return a JS object:\r\n\r\n{code:java}\r\nvar test = {\r\n infomation: \"appcelerator\",\r\n logical: \"appcelerator\",\r\n warning: \"appcelerator\"\r\n};\r\n{code}\r\n\r\nThis is the console log:\r\n\r\n{code:java}\r\n[INFO] : (\r\n[INFO] : {\r\n[INFO] : mation = appcelerator;\r\n[LOG] ical = appcelerator;\r\n[WARN] : ing = appcelerator;\r\n[WARN] : }\r\n{code}\r\n\r\nAfter the Appcelerator 4.8.0, I've noticed that the logs are always align at the left side without spaces/tabs before, before that, if the log is a JS object or array it should have some space or tab to distinguish from its parent\r\n\r\n*OLD WAY:*\r\n\r\n{code:java}\r\n[INFO] {\r\n[INFO] prop1: \"val1\",\r\n[INFO] prop2: \"val2\",\r\n[INFO] prop3: {\r\n[INFO] subprop: \"subval\"\r\n[INFO] }\r\n[INFO] }\r\n{code}\r\n\r\n*NOW:*\r\n\r\n{code:java}\r\n[INFO] {\r\n[INFO] prop1: \"val1\",\r\n[INFO] prop2: \"val2\",\r\n[INFO] prop3: {\r\n[INFO] subprop: \"subval\"\r\n[INFO] }\r\n[INFO] }\r\n{code}\r\n\r\n\r\n!attachment-name.jpg|thumbnail!", "attachment": [], "flagged": false, "summary": "iOS: CLI - Console logs cut initial words if starts with log levels substrings", "creator": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "subtasks": [], "reporter": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "environment": "MacBook Pro with MacOS Sierra 10.12.1\r\niPad Retina Simulator v10.1\r\nAppcelerator 4.8.1.201612050850\r\nTitanium SDK 6.0.0.GA", "comment": { "comments": [ { "id": "404139", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thats interesting. Is it on iOS, Android or Windows Phone? And which SDK version? Some more infos in the ticket details would be awesome, then we can move it to engineering! \r\n\r\n*EDIT*: I did a quick smoke-test using this demo-code:\r\n{code:js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: 'Trigger Log'\r\n});\r\n\r\nbtn.addEventListener('click', function() {\r\n Ti.API.info({\r\n infomation: \"appcelerator\",\r\n logical: \"appcelerator\",\r\n warning: \"appcelerator\"\r\n });\r\n});\r\n\r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\nThe iOS output looks correctly:\r\n{code}\r\n2017-01-05 13:20:51.751 Titanium[3132:87174] [INFO] {\r\n infomation = appcelerator;\r\n logical = appcelerator;\r\n warning = appcelerator;\r\n}\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-05T12:15:34.000+0000", "updated": "2017-01-05T12:21:40.000+0000" }, { "id": "404151", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~hansknoechel], I tested your code in Android and iOS. In iOS I got as expected.\r\n{code}\r\n[INFO] : {\r\n[INFO] : infomation = appcelerator;\r\n[INFO] : logical = appcelerator;\r\n[INFO] : warning = appcelerator;\r\n[INFO] : }\r\n{code}\r\n\r\nBut, in Android i got\r\n{code}\r\n[INFO] [object Object]\r\n{code}\r\n\r\nNot sure what the issue. Have any idea?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-05T15:12:07.000+0000", "updated": "2017-01-05T18:40:41.000+0000" }, { "id": "404157", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~ricardo_jcp] Thanks for the updated ticket infos! So it's happening on iOS for you? Very interesting! And I see you're using the Studio, it be a Studio issue then. For the indentation, please file another ticket so we can fix that as well. \r\n\r\nCan you please try to reproduce the error on the CLI using {{appc run -p ios}} from your project directory? Thank you!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-05T18:43:20.000+0000", "updated": "2017-01-05T18:43:20.000+0000" }, { "id": "404158", "author": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "updateAuthor": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2017-01-05T19:15:25.000+0000", "updated": "2017-01-05T19:15:25.000+0000" }, { "id": "404916", "author": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "updateAuthor": { "name": "ricardo_jcp", "key": "ricardo_jcp", "displayName": "Ricardo Pereira", "active": true, "timeZone": "Europe/Lisbon" }, "created": "2017-01-20T11:05:58.000+0000", "updated": "2017-01-20T11:05:58.000+0000" }, { "id": "404917", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks Ricardo. Please check [this Stackoverflow|http://stackoverflow.com/questions/3515523/javascript-how-to-generate-formatted-easy-to-read-json-straight-from-an-object] on how to indent your stringified code in JS. Thx!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-01-20T11:07:39.000+0000", "updated": "2017-01-20T11:07:39.000+0000" }, { "id": "415728", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket with reference to the previous comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T18:59:52.000+0000", "updated": "2017-03-24T18:59:52.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }