[JDEV] patch: jabberd-1.4 logfile rotation
Martin Lesser
jabber-adm at better-com.de
Wed Oct 2 00:57:56 CDT 2002
Ralph Siemsen <ralphs at blueairnetworks.com> writes:
> Attached is a small patch to make jabberd-1.4 play nice with the
> logrotate facility. Actually this is only half the story, I got lost
> trying to chase down how error.log and record.log actually get
> written, so those are not yet addressed. Pointers welcomed!
Why not use multilog from http://cr.yp.to/daemontools.html in
combination with the other utitlities provided by this great piece of
software?
There are several benefits:
- automatic restart of died daemons (with supervise)
- automatic rotation of logfiles depending on (configurable) size and
number of logfiles
- possibility to filter the entries which should be written to the
logfile combined with the possibility to maintain several logfiles for
different purposes (i.e. one logfile only for output of mio.c)
- very precise timestamping (up to nanosecs) of each line in logs
- easy signalling to daemons (with svc)
- possibility to define resource limits for a process using softlimit
which is also part of daemontools
The cons (which IMO are no cons) should be mentioned too:
- only available for unices (not really a con)
- timestamping is done in TAI-format so you need i.e. tai64nlocal (also
part of the suite) to convert the timestamps into a human readable
format ('tai64nlocal < logfile |less' would do it)
Give it a try, you will love it.
Martin
--
Express-Kommunikation mit Jabber:
JabberID: martin at jabber.bettercom.de
Infos unter http://www.better-com.de/pages/im.php
More information about the JDev
mailing list