Skip to content

Clean up terminal output with verbose mode  #2006

@burkeholland

Description

@burkeholland

Currently, the terminal outputs virtually everything from underlying build processes. This makes the terminal extremely cluttered, and it's hard to find log statements because there is so much noise.

For instance, currently when we run tns livesync ios --emualtor --watch, the terminal shells out the following text.

tns livesync ios --emulator --watch
Executing before-prepare hook from /Users/burkeholland/dev/burkeholland/nativescript-instagram/hooks/before-prepare/nativescript-dev-typescript.js
Found peer TypeScript 1.8.10
Project successfully prepared (ios)
Executing before-livesync hook from /Users/burkeholland/dev/burkeholland/nativescript-instagram/hooks/before-livesync/nativescript-angular-sync .js
Transferring project files...
Successfully transferred all files.
Applying changes...
Successfully synced application org.nativescript.nativescriptinstagram on device 70547B05-8B62-487D-A39C-5D7522A41B3A.
Executing before-watch hook from /Users/burkeholland/dev/burkeholland/nativescript-instagram/hooks/before-watch/nativescript-dev-typescript.js
Found peer TypeScript 1.8.10
8:23:55 AM - Compilation complete. Watching for file changes.

Aug 18 08:24:00 hollandmac backboardd[74984]: SecTaskCopyDebugDescription: nativescriptinst[93322]
Aug 18 08:24:00 hollandmac backboardd[74984]: SecTaskCopyDebugDescription: nativescriptinst[93322]
Aug 18 08:24:00 hollandmac backboardd[74984]: SecTaskCopyDebugDescription: nativescriptinst[93322]
Aug 18 08:24:00 hollandmac backboardd[74984]: SecTaskCopyDebugDescription: nativescriptinst[93322]
Aug 18 08:24:00 hollandmac backboardd[74984]: SecTaskLoadEntitlements failed error=22 cs_flags=200, task->pid_self=-1
Aug 18 08:24:00 hollandmac backboardd[74984]: SecTaskCopyDebugDescription: nativescriptinst[93322]
Aug 18 08:24:00 hollandmac nativescriptinstagram[93322]: assertion failed: 15G31 13E230: libxpc.dylib + 71506 [6F98A9DA-B46E-3A2B-88D4-92F1EC77477F]: 0x7d
Aug 18 08:24:00 hollandmac nativescriptinstagram[93322]: CONSOLE LOG file:///app/tns_modules/@angular/core/src/facade/lang.js:345:16: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.

Most of the time, nearly all of this information is irrelevant to the developer. All they need to know is whether or not the command they issued is running, and what it's current status is. You might imagine that it could look like the following....

tns livesync ios --emulator --watch
Preparing livesync .... 10% [ 20%, 30%, ... ]
Watching for changes...

In the rare cases where the developer wants to see the complete output, they could pass in a verbose or v flag.

tns livesync ios --emulator --watch --v

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions