Pm2: Add a -q, --quiet option, and reduce the default level of verbosity.

Created on 25 Jul 2013  ยท  5Comments  ยท  Source: Unitech/pm2

pm2 is very verbose by default even without the -v, --verbose option. I feel that some of this default verbosity could be reduced and output only if the -v option is specified. Additionally, I feel pm2 needs a -q, --quiet option where it does not output to the console except in case of errors.

For an example of what I mean by reducing the default level of verbosity consider what happens when executing pm2 stopAll

$ pm2 stopAll
โŒฌ PM2 Stopping all processes
  โ—ก Processing...

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Script โ”‚ id โ”‚ PID โ”‚ status โ”‚ Restarted โ”‚ Last restart โ”‚ memory โ”‚ err logs โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

If pm2 stopped all processes then there shouldn't be any processes to list, and this process list below the command is useless nearly 100% of the time except perhaps if pm2 has a bug which caused a process to not be stopped.

This is just one example of where excessive console output could be trimmed out and only output if the user explicitly specifies the -v option.

What are your thoughts on this? Does anyone else agree? If so I may spend some time creating a less verbose fork and submit a pull request.

Most helpful comment

3 years later and here I am hoping for the same thing..

4 years later i am wondering what is the issue when i only get this error:
Deploy failed
I think pm2 needs the oposite (more proper error logging than this..)

All 5 comments

Mmm yes would be nice but not critical for now, closing

3 years later and here I am hoping for the same thing..

PM2_SILENT=true pm2 <command>

Ah, thats great! Thanks!

3 years later and here I am hoping for the same thing..

4 years later i am wondering what is the issue when i only get this error:
Deploy failed
I think pm2 needs the oposite (more proper error logging than this..)

Was this page helpful?
0 / 5 - 0 ratings