Re: Sort logfiles at rotation time

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



2009/11/9 Jorge Fábregas <jorge.fabregas@xxxxxxxxx>:
> On Monday 09 November 2009 10:00:32 am Stephen Nelson-Smith wrote:
>> I want to be certain that my apache and varnish logfiles are in strict
>> date order when rotated.  I'd like to run a sort command against them
>> before they're compressed.
>
> I use the dateext option in my logrotate configuration file so that rotated
> files have the date appended to the filename.  I also compress them so they
> end up like:
>
> whatever-site-access.log.20090930.gz

...

Yes, I do that too.

> If
> you want them strictly sorted by date you'll need to investigate.  I'm not
> sure if logrotate provides any facility in order to manipulate the "current"
> file being rotated so maybe you'll have to do this via a shells cript & cron
> (after logs are rotated).

That would be a shame...  it would work, but it would suck.

S.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux