pm2 icon indicating copy to clipboard operation
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)

Open t-poirier opened this issue 6 months ago • 1 comments

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

t-poirier avatar Jun 01 '25 14:06 t-poirier

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 01 '25 14:06 CLAassistant