Re: Combining logs in daemontools-like frameworks?

From: Laurent Bercot <ska-supervision_at_skarnet.org>
Date: Mon, 9 Nov 2015 17:08:10 +0100

On 09/11/2015 16:51, Casper Ti. Vector wrote:
> I also considered the fifo method, but it appears that logs from
> different sources might be interleaved on the character level (for
> example, with `aaaa...' lines from source A and `bbbb...' lines from
> source B you might end up with `aabaabbb...' in the combined log) if no
> correct scheduling is done by the mixer, and I reckon that the
> scheduling routine will not be quite trivial to write...

  Unix guarantees that writes to pipes are atomic up to PIPE_BUF
characters. So, if your services only write full lines at a time,
only lines will be interleaved, not characters.

-- 
  Laurent
Received on Mon Nov 09 2015 - 16:08:10 UTC

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