Page MenuHomePhabricator

Logger: prefix log output with a timestamp
Closed, ResolvedPublic

Description

The parsoid service on the beta cluster runs on deployment-parsoid04.eqiad.wmflabs. I have made it to log to /data/project/parsoid/parsoid.log, I guess that is simply the standard/error outputs being redirected there.

It would be very helpful to prefix each message with a human readable timestamp. For now we get:

master shutting down, killing workers
Worker 32039 shutting down
Exiting master
master(32050) initializing 5 workers

  • worker(32060) loading... ..

The timestamp should probably only be added when run in daemon mode, i.e. when the standard/error outputs are not ttys.


Version: unspecified
Severity: enhancement

Details

Reference
bz63412

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:07 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz63412.

Any idea to get timestamps in log files ? :-]

All events sent to logstash now have timestamps. But, default logging (in development) doesn't. Is this useful for dev?

(In reply to ssastry from comment #2)

All events sent to logstash now have timestamps. But, default logging (in
development) doesn't. Is this useful for dev?

The purpose was to figure out when a Parsoid daemon related event occurred on beta. Since they are now sent to logstash (bug 57711) that fulfills my original need :-)

Thank you!