+ Dave Sill <[EMAIL PROTECTED]>:

| "Brett Randall" <[EMAIL PROTECTED]> wrote:
| 
| >I'm in need of some sanity. Does a patch exist, or does anyone want
| >to make one, to make multilog rotate logs based on time rather than
| >file size?
| 
| There's a patch that causes multilog to close the current file when
| it receives a certain signal, but I don't have a pointer to it.

It should be easy enough, in principle, to solve this using
daemontools.  Assuming the logger is controlled by svscan/supervise
using a <service>/log directory, just have a cron job kill the logger
using svc -t.  Supervise will start a new logger.  Now, unless you do
something, the new logger will run in the same directory, and keep
appending to current until it's big enough.  To avoid this problem,
let the logger actually be a shell script along the lines of

#!/bin/sh
exec multilog ... `date +/var/log/foolog.%Y-%m-%d` ...

Voila, each day's log output in its own directory.  Postprocess and
rearrange to your heart's content.

This solution comes untested and without a warranty, but I can't see
why it should not work.

ObOffTopic:

+ Peter Samuel <[EMAIL PROTECTED]>:

|     - 911 is the emergency number in North America, while it is 000 in
|       Oz, 999 in NZ and UK etc.

While it is 112 in the rest of the civilized world?  That's actually
an international standard.

- Harald

Reply via email to