Re: logging and mutualise outputs

From: Laurent Bercot <ska-supervision_at_skarnet.org>
Date: Fri, 3 Jun 2016 16:35:52 +0200

On 03/06/2016 15:32, Vincent de RIBOU via supervision wrote:
> Thanks for the quick answer
> This way can only be performed offline.Is it possible to perform the same mechanism but having concatenated file along all the others at all times ?

  Tee your output to a fifo. Have a logger (could be 'cat') read from the
fifo and write to your file.

  Teeing the output can be done with the "1" directive to s6-log:
"redirfd -w 1 /global/fifo s6-log t 1 t /local/logdir" will log everything
both to /local/logdir (rotated) and to /global/fifo (as is). However, s6-log
will stop writing to /global/fifo as soon as it encounters an error, so
make sure the fifo's reading end remains open at all times.

-- 
  Laurent
Received on Fri Jun 03 2016 - 14:35:52 UTC

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