[libvirt] [PATCH] logrotate: don't rotate zero-length logfiles only

Eric Blake eblake at redhat.com
Tue Apr 20 16:52:59 UTC 2010


On 04/18/2010 10:15 AM, Anton Protopopov wrote:
> Hi.
> 
> In logrotate configuration files used by libvirt, there is an option
> 'minsize 100k',
> which prevents logrotate from rotating small (< 100k) files into an archive.
> 
> But the target goal of the
> http://www.mail-archive.com/libvir-list@redhat.com/msg17443.html
> patch was to prevent logrotate from packing _empty_ files. This indeed could
> be done more
> accurately with the 'notifempty' option, see attached patch.

Is there any technical advantage to replacing 'minsize 100k' with
'notifempty'?  That is, if the elapsed time has expired, and there is
data, but not yet 100k of data, am I correct that minsize would prevent
the rotation while notifempty would allow it?

I'm thinking this is a patch in the right direction, but am hoping
someone else will chime in since I don't have much personal experience
with logrotate.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100420/ba8ad5aa/attachment-0001.sig>


More information about the libvir-list mailing list