Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26695] iOS: Do not show Node.js path-tracking in console

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2019-04-11T12:33:56.000+0000
Affected Version/sn/a
Fix Version/sRelease 8.0.1
ComponentsiOS
Labelsn/a
ReporterHans Knöchel
AssigneeChristopher Williams
Created2019-01-07T13:02:56.000+0000
Updated2019-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.

Comments

  1. Hans Knöchel 2019-01-07

    PR: https://github.com/appcelerator/titanium_mobile/pull/10539
  2. Satyam Sekhri 2019-03-04

    Kindly use the PR: https://github.com/appcelerator/titanium_mobile/pull/10572
  3. Satyam Sekhri 2019-03-05

    FR Passed. Waiting on Jenkins build.
  4. Christopher Williams 2019-03-25

    merged to master, cherry-picked to 8_0_X
  5. Samir Mohammed 2019-04-11

    *Closing ticket*, improvement verified in SDK Version 8.1.0.v20190410132858 and SDK Version 8.0.1.v20190408125832 Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/10572

JSON Source