Prev: submissions
Next: Anybody know what this is all about? [Re: Anacron job 'cron.weekly' on whitemac]
From: vr on 17 May 2010 14:00 Due to message volume, I'm considering rotating my mail logs daily at my local time "midnight" and retaining about 30 days worth of files on disk. I'd like to have the date in the file names so visually I'll know what span is in each file. Can this be done? (put dates into the file name) Should this be done? (put the date into the file name) If you're doing something like this already, how did you do it? -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/4BF183E6.6020400(a)iotk.net
From: Chris Jackson on 17 May 2010 14:50 vr wrote: > Due to message volume, I'm considering rotating my mail logs daily at my > local time "midnight" and retaining about 30 days worth of files on > disk. I'd like to have the date in the file names so visually I'll know > what span is in each file. > > Can this be done? (put dates into the file name) You need the dateext option in the logrotate config. That'll mean your archives have the date extension, and the current one is just whatever it's normally called, which I guess should be OK for you? > Should this be done? (put the date into the file name) Never caused me any problems ;) -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/4BF1874F.60209(a)shadowcat.co.uk
From: Camaleón on 17 May 2010 14:50 On Mon, 17 May 2010 13:59:02 -0400, vr wrote: > Due to message volume, I'm considering rotating my mail logs daily at my > local time "midnight" and retaining about 30 days worth of files on > disk. I'd like to have the date in the file names so visually I'll know > what span is in each file. > > Can this be done? (put dates into the file name) Sure, I do :-) man logrotate → dateext > Should this be done? (put the date into the file name) Sure, I do in my "fetchmail" logs :-) > If you're doing something like this already, how did you do it? By defining "dateext" variable info the "logrotate" script. *** dateext Archive old versions of log files adding a daily extension like YYYYMMDD instead of simply adding a number. *** Greetings, -- Camaleón -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/pan.2010.05.17.18.40.51(a)gmail.com
From: Timo Boettcher on 17 May 2010 17:50 Hi! * vr <debian-user(a)iotk.net> wrote: > I'd like to have the date in the file names so visually I'll know > what span is in each file. > > Can this be done? (put dates into the file name) Depends. See the other posts about logrotate > Should this be done? (put the date into the file name) No clue > If you're doing something like this already, how did you do it? I am logging to syslog (the protocol) and replaced syslog (the package) with syslog-ng. syslog-ng can be configured to do this: destination df_syslog { file("/var/log/$HOST/$YEAR/$MONTH/$DAY/syslog" template("$ISODATE $HOST $MSG\n") owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes)); }; This is a snipped that configures a file in a directory-structure matching the hostname and the date (you should be able to guess the details...) http://www.syslog.org/syslog-ng/v2/ has some more examples. Timo -- To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org Archive: http://lists.debian.org/20100517211206.GA5127(a)spinnennetz.org
|
Pages: 1 Prev: submissions Next: Anybody know what this is all about? [Re: Anacron job 'cron.weekly' on whitemac] |