Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] logrotate desn't create new empty files
Date: Sun, 05 Aug 2007 09:10:18
Message-Id: 200708051004.14926.michaelkintzios@gmail.com
In Reply to: Re: [gentoo-user] logrotate desn't create new empty files by Jakob
1 On Sunday 05 August 2007 08:36, Jakob wrote:
2
3 > Thanks for that hint, but there was nothing about logrotate in dead.letter.
4 > logrotate itself works fine for me but I want the messages file erased
5 > after rotating and start with a new file and that doesn't work.
6 > any more ideas?
7
8 I am not sure I understand "that doesn't work":
9
10 It does not rotate the message log file at all?
11 It rotates it but does not create a new empty message log file after rotation?
12
13 Anyway, look at your script in /etc/logrotate.d/syslog-ng:
14
15 Your entry for olddir is redundant. The rotated logs will remain in
16 the /var/log directory anyway. Use olddir if you want to place them
17 somewhere else; e.g. /var/log/old_messages, but make sure that the new
18 directory old_messages is owned by root:root.
19
20 As already commented by Matthias Guede, the entry "copy" is not appropriate if
21 you want to actually rotate the log file as opposed to just copy it.
22
23 The entry "create 0600 root root" is also redundant as you already specify
24 create as a default option in your /etc/logrotate.conf. (This may mess
25 things up.)
26
27 Finally, the size at 5M is relatively large so rotation is not going to take
28 place that often unless you force it.
29
30 HTH.
31 --
32 Regards,
33 Mick