Re: Readiness notification for systemd

From: Laurent Bercot <ska-supervision_at_skarnet.org>
Date: Tue, 16 Jun 2015 21:28:58 +0200

On 16/06/2015 20:40, Avery Payne wrote:
> Logging generally (but not always) implies calling printf() with a
> newline at some point.
>
> What if we could come up with a simple standard that extends your
> newline concept into the logging output? A newline itself may be
> emitted as part of a startup string sent to a log, so I can't be
> assured that a daemon is really ready. But what if we could ensure
> that a universally agreed pattern were present in the log? Something
> like "Ready.\n" when the daemon is up. We literally could watch the
> stdout/stderr for this pattern and would solve the entire "readiness
> notification" problem in one go.

  Well, I really don't like that approach because it mixes a control flow
and a data flow; and when you do that, bad things tend to happen.
  Data flows are big beasts that 1. require efficiency, and 2. will really
mess you up if you take just one wrong step. Data analysis is really a
job for application programs; for system software, I'd rather not get in
the way, and just let logs flow.

  (If you add a log filter just for readiness notification, you can't
remove that filter afterwards. You have to keep filtering the log 100%
of the time. It's possible - on the skaware mailing-list, Patrick needed
such a setup - but I wouldn't want it to be a standard, it's too kludgy
and inefficient.)

-- 
  Laurent
Received on Tue Jun 16 2015 - 19:28:58 UTC

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