httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel <dferra...@gmail.com>
Subject Re: [users@httpd] question about roatelogs -n
Date Sat, 28 Mar 2015 23:42:00 GMT
2015-03-28 20:43 GMT+01:00 Jonny Rimkus <jonny@rimkus.it>:

>
> Hello,
> I've a question to the rotatelogs command.
> I'm using following Apache Version:
>
> Server version: Apache/2.4.7 (Ubuntu)
> Server built:   Mar 10 2015 13:05:59
>
> I'm using the rotatelogs command in my Vhost as follows:
> "|/usr/bin/rotatelogs -p /opt/bin/apacheloguser -n 3 /path/to/logfile
> 10M" combined
>
> according to the man page it works as expected,
> when logfile size reaches 10MB it:
> 1. creates a new File: logfile.1 and starts logging to this file
> --> when logfile.1 reaches 10MB:
> creates a new file: logfile.2 and start logging to this file
>
> I would like to know if it is possible to make this behaviour possible:
>
> 1. rename logfile.1 to logfile.2
> 2. rename logfile to logfile.1
> 3. create new file logfile and start logging to this file
>
> Thanks in advance and
> Kind regards
> Jonny Rimkus
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Logrotate from your linux distrubution will do exactly just that. Maybe
that's what you want to use instead of rotatelogs.


-- 
*Daniel Ferradal*
IT Specialist

email         dferradal@gmail.com
linkedin     es.linkedin.com/in/danielferradal

Mime
View raw message