Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

usage of RotateLogs in Apache 2.0.45

Status
Not open for further replies.

SaltyDuke

Programmer
Sep 18, 2002
140
IE
Hello

i'd like to use the RotateLogs feature in Apache 2.0.45, but i'm a little wary because...

when i run the command ".../apache2/bin/rotatelogs" apache suggests the following useage:

TransferLog "| ./rotatelogs /some/where 5M"

i presume this refers to editing httpd.conf, but i dont have a TansferLog directive in it, just CustomLog and ErrorLog. Will it be the same for these?

Thanx a million in advance,
TheSaltyDuke

[pipe]
 
What exactly would i need to add to a setup a daily cronjob for the file?
 
Hi axman505,
There is nothing further required to set once you have added the lines to httpd.conf and re-started Apache, the process is controled by Apache

See: man rotatelogs, the syntax is:
rotatelogs logfile rotationtime [offset]

Where:
logfile is your log
rotationtime is in seconds e.g. 86400 = 24hrs
offset is the number of minutes offset from UTC

Good luck
L.
 
when you say logfile is your log, what exactly gets replaces there?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top