[TIMOB-24280] iOS: CLI - Console logs cut initial words if starts with log levels substrings
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2017-01-20T11:07:39.000+0000 |
Affected Version/s | Release 6.0.0, Release 6.0.1 |
Fix Version/s | n/a |
Components | iOS |
Labels | console |
Reporter | Ricardo Pereira |
Assignee | Eric Merriman |
Created | 2017-01-05T12:01:51.000+0000 |
Updated | 2017-03-24T18:59:52.000+0000 |
Description
Note that this is a small issue!
If the initial name of a object property starts with a substring that is similar to the log level, it cuts it's initial words
[INFO] : SELECT 'appcelerator' as infomation, 'appcelerator' as logical, 'appcelerator' as warning
Will return a JS object:
var test = {
infomation: "appcelerator",
logical: "appcelerator",
warning: "appcelerator"
};
This is the console log:
[INFO] : (
[INFO] : {
[INFO] : mation = appcelerator;
[LOG] ical = appcelerator;
[WARN] : ing = appcelerator;
[WARN] : }
After 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
*OLD WAY:*
[INFO] {
[INFO] prop1: "val1",
[INFO] prop2: "val2",
[INFO] prop3: {
[INFO] subprop: "subval"
[INFO] }
[INFO] }
*NOW:*
[INFO] {
[INFO] prop1: "val1",
[INFO] prop2: "val2",
[INFO] prop3: {
[INFO] subprop: "subval"
[INFO] }
[INFO] }
!attachment-name.jpg|thumbnail!
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! *EDIT*: I did a quick smoke-test using this demo-code:
The iOS output looks correctly:
Hello [~hansknoechel], I tested your code in Android and iOS. In iOS I got as expected.
But, in Android i got
Not sure what the issue. Have any idea?
[~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. Can you please try to reproduce the error on the CLI using
appc run -p ios
from your project directory? Thank you!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!
Closing ticket with reference to the previous comments.