preserving a distinction between stdout and stderr in logs

From: Buck Evan <buck_at_yelp.com>
Date: Wed, 12 Aug 2015 00:09:09 -0700

A common trend is to display stderr in red.
This often makes reading a log more clear.

The current practice that I see for logging stdout and stderr in the
daemontools family is to run some equivalent of `exec 2>&1`, which
irretrievably interleaves the two streams.


Have any of you seen a clean implementation that provides logging under
daemontools(et al) and preserves a notion of separate stdout and stderr?

I'd like to standardize how my services are logged and as such avoid any
boilerplate in run scripts. My current implementation plan is to not use
svscan and run supervise myself with file descriptors connected
appropriately. In keeping with tai64n, the result might not be colorized
output as much as a stream of lines with their file descriptors as a
tab-delemited prefix, to be colorized (or not) as a formatting step.
Received on Wed Aug 12 2015 - 07:09:09 UTC

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