lang/node
Pm2 log dateformat
C/H
2017. 6. 16. 11:14
pm2 install pm2-logrotate
pm2 start app.js --log-date-format 'DD-MM HH:mm:ss.SSS'
{ "apps": [ { { "script" : "echo.js", "error_file" : "err.log", "out_file" : "out.log", "merge_logs" : true, "log_date_format" : "YYYY-MM-DD HH:mm Z" } ] }
pm2 set pm2-logrotate:max_size 100M; pm2 set pm2-logrotate:dateFormat YYYY-MM-DD_HH-mm-ss; pm2 set pm2-logrotate:rotateInterval '0 * * * *'; pm2 set pm2-logrotate:retain all; pm2 set pm2-logrotate:compress true;
반응형