我们的磁盘在Apache Logs的Windows上变得非常快。我想覆盖旧的日志文件,这样一次只有10个文件,每个文件的容量为5M。 有没有办法像Unix上的logrotate.conf一样使用旋转4来在Windows中创build4个文件之后旋转日志?
我看了这个条目,但是没有帮助。 使用rotatelogs.exe旋转其他日志
ErrorLog "|bin/rotatelogs.exe -l C:/WampDeveloper/Logs/Websites/www.example.com/http.errorlog.%Y-%m-%d.txt 86400" CustomLog "|bin/rotatelogs.exe -l C:/WampDeveloper/Logs/Websites/www.example.com/http.accesslog.%Y-%m-%d.txt 86400" combinedtrueout_host CustomLog "|bin/rotatelogs.exe -l C:/WampDeveloper/Logs/Websites/www.example.com/http.deflatelog.%Y-%m-%d.txt 86400" deflate
新解决scheme
#ErrorLog "logs/error.log" ErrorLog "|bin/rotatelogs.exe -l D:/Apache2.2/logs/error.%Y.%m.%d.log 86400" #CustomLog "logs/access.log" common CustomLog "|bin/rotatelogs.exe -l D:/Apache2.2/logs/access.%Y.%m.%d.log 86400" common #TransferLog "D:/Apache2.2/logs/ssl_access.log" TransferLog "|bin/rotatelogs.exe -l D:/Apache2.2/logs/ssl_access.%Y.%m.%d.log 86400" #CustomLog "D:/Apache2.2/logs/ssl_request.log" \ # "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" CustomLog "|bin/rotatelogs.exe -l D:/Apache2.2/logs/ssl_request.%Y.%m.%d.log 86400" \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"