在Apache下的httpd.conf配置文件下找到下面两句:
ErrorLog logs/error.log
CustomLog logs/access.log common
不记录直接注释掉

每天一个文件,并且限制大小
CustomLog "|bin/rotatelogs.exe c:/wamp/logs/access-%Y-%m-%d.log 100M" common

限制错误日志文件为 1M

ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 1M”

每天生成一个错误日志文件

ErrorLog "|bin/rotatelogs.exe -l logs/error-%Y-%m-%d.log 86400″

限制访问日志文件为 1M

CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 1M” common

每天生成一个访问日志文件

CustomLog "|bin/rotatelogs.exe -l logs/access-%Y-%m-%d.log 86400″ common