Is it possible to let supervisord add timestamps to the outputs in stdout_logfile
and stderr_logfile
? I couldn't find it anything about that in the documentation.
Asked
Active
Viewed 3,301 times
7
Norbert
- 171
- 1
- 3
-
Send the output to the syslog and let it take care of this? – Sven Apr 28 '15 at 08:25
-
There are a lot of messages from the child process and for the purpose of traceability I need them without the syslog clutter. – Norbert Apr 29 '15 at 11:43
-
1Did you figure this out? I was wondering the same thing. – sdot257 Oct 14 '16 at 20:16
1 Answers
0
My $0.02. If you are running in Docker, then let the docker container capture stdin/stdout and capture timestamps that way. If not, send output to syslog and let either systemd or rsyslog append their timetstamps. Unless your system is heavily loaded (and rsyslog/systemd cannot keep up), this should get you what you need.
See this answer for docker.
See the official documentation for rsyslogd and search for "precision". For some vendors (RedHat, Ubuntu) this may already be enabled by default.
See this nice tutorial on using journalctl with systemd.
Otheus
- 432
- 3
- 12
-
2I think the lack of support for timestamps and journal are a dealbreaker for a lot of people including me. Systemd does all that out of the box. The only downside of using systemd is that you need to code in `sd_notify` heartbeat on the client-side to use the watchdog feature. – Fred Flint Mar 31 '21 at 15:43