external logging via helpers

From: Robert Collins <robert.collins@dont-contact.us>
Date: 08 Aug 2001 22:51:13 +1000

I've put together a small patch to log via a helper process, rather than
direct to the log file. It is needed for production ready NTLM use (as
noted in the squid 3 faq o matic).

Please have a look, I'm interested in feedback.

Key points:
* debug() still logs direct to the file.
* logfile.c opens a helper process with a new IPC construct - a one way
helper (no feedback expected or able to happen)
* if a log helper cannot log, it will kill squid (this should probably
get parameterised to be a per log file settings)
* if a log helper crashes or is killed by the user squid will restart
the helper (probably we should count to a given number of log helper
crashes, and then abort squid "too many log errors")
* all ipc helpers are given the write end of the pipe to the cache.log
log helper.
* helpers are not restarted on a log rotate now - should allow faster
log rotates. (No need - the are writing to a pipe that stays open).
* logging via helper is unstructured data. If database inserts are
needed, that part of squid should log structured data, and have a
different log helper than the trivial one I've created used. (nb: this
requires extending the logfile API to allow specifying the log helper to
use).

Rob
Received on Wed Aug 08 2001 - 06:51:17 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:10 MST