[TIMOB-26695] iOS: Do not show Node.js path-tracking in console
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-04-11T12:33:56.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 8.0.1 |
Components | iOS |
Labels | n/a |
Reporter | Hans Knöchel |
Assignee | Christopher Williams |
Created | 2019-01-07T13:02:56.000+0000 |
Updated | 2019-04-11T12:33:56.000+0000 |
Description
This is a minor one, but I find it important to mention: As our app grows (70+ controllers), we are starting to experience an issue related to debug logs. When calling
import
(transpiled down to require()}}, the Node.js path-algorithm (implemented by [~cwilliams] 2 years ago) steps in and returns an instance of the exported object. So good so far, but in our case, this produces hundrets of log messages, e.g.:
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/alloy/widgets/node_modules/app-utils, Resource: alloy/widgets/node_modules/app-utils
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/alloy/widgets/node_modules/app-utils.js, Resource: alloy/widgets/node_modules/app-utils_js
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/alloy/widgets/node_modules/app-utils.json, Resource: alloy/widgets/node_modules/app-utils_json
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/alloy/widgets/node_modules/app-utils/package.json, Resource: alloy/widgets/node_modules/app-utils/package_json
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/alloy/widgets/node_modules/app-utils/index.js, Resource: alloy/widgets/node_modules/app-utils/index_js
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/alloy/widgets/node_modules/app-utils/index.json, Resource: alloy/widgets/node_modules/app-utils/index_json
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/alloy/node_modules/app-utils, Resource: alloy/node_modules/app-utils
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/alloy/node_modules/app-utils.js, Resource: alloy/node_modules/app-utils_js
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/alloy/node_modules/app-utils.json, Resource: alloy/node_modules/app-utils_json
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/alloy/node_modules/app-utils/package.json, Resource: alloy/node_modules/app-utils/package_json
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/alloy/node_modules/app-utils/index.js, Resource: alloy/node_modules/app-utils/index_js
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/alloy/node_modules/app-utils/index.json, Resource: alloy/node_modules/app-utils/index_json
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/node_modules/app-utils, Resource: node_modules/app-utils
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/node_modules/app-utils.js, Resource: node_modules/app-utils_js
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/node_modules/app-utils.json, Resource: node_modules/app-utils_json
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/node_modules/app-utils/package.json, Resource: node_modules/app-utils/package_json
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/node_modules/app-utils/index.js, Resource: node_modules/app-utils/index_js
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/node_modules/app-utils/index.json, Resource: node_modules/app-utils/index_json
[DEBUG] Loading: /Users/hans/Library/Developer/CoreSimulator/Devices/884D0F2B-46F2-41D5-AA78-C26BC42BF348/data/Containers/Bundle/Application/8E865D94-2666-4345-B0C9-EBF806D8BC39/SwaggyApp.app/app-utils, Resource: app-utils
Note: The above 19 logs are for *one* file, think about a complex view with 10+ controllers, common-js modules and external node_modules.
So long story short: I'd like to remove this log for the compiled / packaged version of the SDK. Since it can still be useful to trace imports in the core-development of Titanium (where it will still be enabled), this should not break any development flows and make the console output more structured again - especially when using debug logs á lá JavaScript.
PR: https://github.com/appcelerator/titanium_mobile/pull/10539
Kindly use the PR: https://github.com/appcelerator/titanium_mobile/pull/10572
FR Passed. Waiting on Jenkins build.
merged to master, cherry-picked to 8_0_X
*Closing ticket*, improvement verified in SDK Version
8.1.0.v20190410132858
and SDK Version8.0.1.v20190408125832
Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/10572