Pm2: Disable timestamps on log streaming

Created on 5 Feb 2014  路  11Comments  路  Source: Unitech/pm2

pm2 logs shows timestamps on every log entry, while the output is redirected raw to the log files. Therefore, I've set up Winston to prepend timestamps on the log entries so I can search the logs by timestamp. Therefore, inevitably, pm2 logs is showing double timestamps (one produced by PM2, the other produced by Winston). This would be easily fixed by giving pm2 logs a switch to turn off timestamps while streaming. Or even better, having them be off by default. :)

Open for PR Enhancement

Most helpful comment

Unsure if this was actually ever resolved or what as this ticket was closed without explanation on Aug 23, 2014, but currently PM2 shows timestamps in the logs, even if I specify log_date_format: '' (which should format all the timestamps to nothing).

Similar to OP, I am trying to use PM2 in conjunction with Winston.

image

All 11 comments

:thumbsup:

+1

+1

The 0.10.0 fixing this issue has been published:

$ npm install pm2@latest -g

@Unitech Is there a way to disable timestamps from the .json config file? I tried no including the log_date_format setting, but it keeps showing it. Thanks

The funny thing is that on a Mac it disables the timestamp logging. On Ubuntu it continues to display it.

Unsure if this was actually ever resolved or what as this ticket was closed without explanation on Aug 23, 2014, but currently PM2 shows timestamps in the logs, even if I specify log_date_format: '' (which should format all the timestamps to nothing).

Similar to OP, I am trying to use PM2 in conjunction with Winston.

image

same problem here on CentOS. Is there a way to disable timestamp in logging ?

@Unitech please respond

+1

I found a simple solution to this: don't use pm2, and move to phusion passenger

Was this page helpful?
0 / 5 - 0 ratings

Related issues

getvega picture getvega  路  3Comments

shaunwarman picture shaunwarman  路  3Comments

liujb picture liujb  路  3Comments

chaos-git picture chaos-git  路  3Comments

alexpts picture alexpts  路  3Comments