pm2
pm2 copied to clipboard
fix: command "pm2 reloadLogs" does not respect silent flags when used in daemon mode (like when executing with Node.js child_process.exec)
When programmatically executing "pm2 reloadLogs" like with child_process.exec, the flags -s and --silent are not respected because the command is passed through pm2-axon-rpc. The only way I found to obtain the desired behavior is to introduce a dedicated command "pm2 reloadLogsSilently" that does the job.
This is useful to avoid the pollution of the console messages when rotating the logs.
| Q | A |
|---|---|
| Bug fix? | yes |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #5927 |
| License | MIT |
| Doc PR | https://github.com/pm2-hive/pm2-hive.github.io/pulls |