Re: SMP: logging

From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Thu, 25 Feb 2010 21:54:10 +0100

tor 2010-02-25 klockan 13:45 -0700 skrev Alex Rousskov:

> Will the simplified code just close and open the log file? Anything else
> needed to integrate with external log rotation programs?

No, that's it. And done by setting "logfile_rotate 0" in squid.conf so
no code changes is needed for it.

> How do they
> handle the uncertainty of when the logging to the old log file ends?

Sequence is:

1. Rename log files.
2. Tell Squid to reopen log files (-k rotate)
3. Optionally wait a little for Squid to react.
4. Process the logs (gzip etc).

Normally compression is only done on the older logs already rotated in
last rotation, so late writes is usually not a big deal.

If compression is done immediately after rotation then there is a slight
risk that some log entries may be lost, especially in cache.log.

Regards
Henrik
Received on Thu Feb 25 2010 - 20:54:15 MST

This archive was generated by hypermail 2.2.0 : Fri Feb 26 2010 - 12:00:16 MST