[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Log rotation



On Tue, Apr 01, 2003 at 12:06:27PM -0500, Mike M wrote:
| On Tuesday 01 April 2003 10:43, Matthew Daubenspeck wrote:
| > I currently have a daemon logging each day's worth of activity into a
| > separate daily log with the daemon-month.date.year format.
| > Unfortunately, I cannot change the options of HOW it is logged or what
| > it is named.
| >
| > I really only want to keep a weeks worth of logs, and have tried to use
| > logrotate to handle all the rotation and removal. In short, it doesn't
| > seem to be working. From what I can tell, logrotate is better suited at
| > rotating a single log file, not logs that change the filename daily
| > (such as an apache log).

What is the logrotate config you have tried?

[...]
|I am not sure if logrotate can handle filenames like Mon.*.log.

It can.  Just be sure to anchor the glob.  For example, using
"/var/log/samba/smb*" is really bad because the first rotated file
(smb_foo.1) will match as well.  The above anchor with "*.log"
prevents "<...>log.1" from matching.

-D

-- 
A violent man entices his neighbor
and leads him down a path that is not good.
        Proverbs 16:29
 
http://dman.ddts.net/~dman/

Attachment: pgp4ghvzQmQip.pgp
Description: PGP signature


Reply to: