You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mario Pavlov <fr...@abv.bg> on 2006/07/12 08:43:05 UTC
[users@httpd] limiting log files' size
Hi guys :)
I was searching the documentation for a while for some way to get my httpd-access.log limited by size
but I didn't found anything...
is there a way to limit my log files by size ?
for example when the log file reaches 100Mbytes to stop growing and evry new line to overwrites the oldest
apache2.2.2
FreeBSD 6.1 RELEASE
thank you :)
-----------------------------------------------------------------
http://ide.li/ - портал за българите по света. Статии, новини, форуми, снимки, информация.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: limiting log files' size
Posted by Brandon Fosdick <bf...@bfoz.net>.
Michael Gale wrote:
> What does FreeBSD use to rotate it's logs, it most likely has the same
> features ?
The base system has newsyslog, which does most everything logrotate does. But, logrotate is in the ports tree in case you need/want it.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Re: limiting log files' size
Posted by Michael Gale <mi...@pason.com>.
Hello,
On Linux there is an app called logrotate, this looks after all the
logs under /var/log directory.
It has a copytruncate feature:
copytruncate
Truncate the original log file in place after creating a
copy, instead of moving the old log file and optionally creating a new
one, It can be used when some pro-gram can not be told to close its
logfile and thus might continue writing (appending) to the previous log
file forever. Note that there is a very small time slice between
copying the file and truncating it, so some logging data might be
lost. When this option is used, the create option will have no effect,
as the old log file stays in place.
What does FreeBSD use to rotate it's logs, it most likely has the same
features ?
With logrotate you can specify size.
Michael
Joost de Heer wrote:
> Mario Pavlov wrote:
>
>>Hi guys :)
>>I was searching the documentation for a while for some way to get my
>>httpd-access.log limited by size
>>but I didn't found anything...
>>is there a way to limit my log files by size ?
>>for example when the log file reaches 100Mbytes to stop growing and evry
>>new line to overwrites the oldest
>
>
> http://httpd.apache.org/docs/2.2/programs/rotatelogs.html
>
> Joost
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
--
Michael Gale
Red Hat Certified Engineer
Network Administrator
Pason Systems Corp.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] Re: limiting log files' size
Posted by Joost de Heer <sa...@xs4all.nl>.
Mario Pavlov wrote:
> Hi guys :)
> I was searching the documentation for a while for some way to get my
> httpd-access.log limited by size
> but I didn't found anything...
> is there a way to limit my log files by size ?
> for example when the log file reaches 100Mbytes to stop growing and evry
> new line to overwrites the oldest
http://httpd.apache.org/docs/2.2/programs/rotatelogs.html
Joost
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org