node.js - about pm2 reloadLogs and log-date-format -


i using pm2 version 0.12.9

i start app using command:

pm2 start bin/www --name gototravel --log-date-format="yyyy-mm-dd hh:mm z"

then query pm2 logs

ll ~/.pm2/logs

-rw-rw-r-- 1 wucho wucho 0 may 12 11:03 gototravel-error-0.log

-rw-rw-r-- 1 wucho wucho 1822 may 12 11:03 gototravel-out-0.log

my first question don't see log file prefixed timestamp.

then run

pm2 reloadlogs

and query pm2 logs,but no log generated

ll ~/.pm2/logs

-rw-rw-r-- 1 wucho wucho 0 may 12 11:03 gototravel-error-0.log

-rw-rw-r-- 1 wucho wucho 1822 may 12 11:03 gototravel-out-0.log

i nodejs newbee , give me suggestions?

s

--log-date-format prefix entries in log files, not prefix log file names.

reloadlogs doesn't rotate logs you. causes log file recreated if it's been rotated out under program process.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -