Re: Has anybody build (or thought about) a supervisor with two log streams?

From: Laurent Bercot <ska-supervision_at_skarnet.org>
Date: Sat, 16 Aug 2014 07:39:35 +0100

> I'd like to collect stdout and stderr separately. I could use this, for
> instance, with web servers, to collect access logs from stdout and error
> logs from stderr. Why has nobody done this? Or did I just not notice?

  Well there's only one real log stream, and that is stderr. stdout was
never made to produce logs - it's a part of the application flow.
"Access logs from stdout" sounds weird, why would anyone send access
logs to stdout ?
  Of course, there will always be software that just can't use stderr
the way it was intended to, and insists on logging stuff to stdout;
to me it's no different from software that insists on using syslog.

  Nothing prevents you from logging several streams, however; there
simply isn't any specific support in supervision suites. Just create
a fifo, redirect your service's extra stream to the fifo, and have
another service made exclusively of a logger reading on the fifo.
It won't be quite as reliable (as in, no data loss ever) as the
integrated pipe, but it will be enough for most use cases, especially
since you can still send the most critical logs to the integrated
pipe.

-- 
  Laurent
Received on Sat Aug 16 2014 - 06:39:35 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:18 UTC