[TIMOB-24278] iOS: CLI - Console logs align to left even when logging object properties and subproperties
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Critical |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2017-01-09T15:12:52.000+0000 |
Affected Version/s | Release 6.0.0, Release 6.0.1 |
Fix Version/s | n/a |
Components | iOS |
Labels | console, indentation |
Reporter | Ricardo Pereira |
Assignee | Unknown |
Created | 2017-01-05T19:10:22.000+0000 |
Updated | 2018-02-28T19:54:48.000+0000 |
Description
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] }
!Screen Shot 2017-01-05 at 11.50.16.png|thumbnail!
Attachments
File | Date | Size |
---|---|---|
Screen Shot 2017-01-05 at 11.50.16.png | 2017-01-05T19:10:12.000+0000 | 49852 |
Hi, I can't reproduce the issue in iOS with the below code section.
I got
Properly indented. Test environment for studio 4.8.1.201612050850
Tested in studio and terminal. Please update SDK and CLI. Thanks.
[~ricardo_jcp] Thanks for this additional ticket! Please provide us your node-version, it must be something like that.
Appcelerator Command-Line Interface, version 6.1.0 Copyright (c) 2014-2017, Appcelerator, Inc. All Rights Reserved. Operating System Name = Mac OS X Version = 10.12.1 Architecture = 64bit # CPUs = 2 Memory = 8.0GB Node.js Node.js Version = 4.6.2 npm Version = 2.15.11 Appcelerator CLI Installer = 4.2.8 Core Package = 6.1.0 Titanium CLI CLI Version = 5.0.11 node-appc Version = 0.2.39 Titanium SDKs 6.0.1.GA Version = 6.0.1 Install Location = /Users/rpereira/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA Platforms = iphone, android, mobileweb git Hash = 265db0d git Timestamp = 12/20/2016 00:55 node-appc Version = 0.2.39
[~cbarber] You having an idea why this could happen?
could be the node js version? Node.js Version = 4.6.2 npm Version = 2.15.11 in the appc 4.8.0 changelog says that the latest is 4.6.x, but I've saw a stack overflow question or a jira ticket (don't remember) that only worked between 4.2.0 and 4.6.0
We trim log messages ONLY when it begins with a known log tag such as
\[info\]
. If the app logs a multi-line output, subsequent lines should not be trimmed. I just tested with Titanium SDK master (6.1.0) and I couldn't reproduce. I tried bothTi.API.log()
andconsole.log()
.Even if there is a bug here, it's almost certainly NOT because of the Node.js version.
Resolving as
Cannot Reproduce
for now, since all three Engineering tests could not reproduce this issue. The logged data in your image looks like some kind of API, so maybe you JSON-stringifies it and forgot to set an indentation level to it? Or some other node-dependency making problems here. If nothing helps, reinstall the CLI and cleanup your other dependencies to have a fresh install. I hope that helps for now. Thanks!