我用了mod_log_rotate这个模块,并且按照要求配置:
# Add to your httpd.conf
LoadModule log_rotate_module modules/mod_log_rotate.so
# Directives provided by mod_log_rotate
You can specify a strftime() format string as the log file name.
So you can do something like
CustomLog logs/access_log.%Y%m%d-%H%M%S common
and have log files named with a human readable date and time.
RotateLogs On
RotateLogsLocalTime On
RotateInterval 86400
但是error.log如何配置了。
errorLog logs/error_log.%Y%m%d-%H%M%S
这样配置文件日期无法转换,想问一下该如何设置了。
# Add to your httpd.conf
LoadModule log_rotate_module modules/mod_log_rotate.so
# Directives provided by mod_log_rotate
You can specify a strftime() format string as the log file name.
So you can do something like
CustomLog logs/access_log.%Y%m%d-%H%M%S common
and have log files named with a human readable date and time.
RotateLogs On
RotateLogsLocalTime On
RotateInterval 86400
但是error.log如何配置了。
errorLog logs/error_log.%Y%m%d-%H%M%S
这样配置文件日期无法转换,想问一下该如何设置了。
编辑回复