Você está na página 1de 2

ErrorLog "|bin/rotatelogs /var/logs/errorlog.%Y-%m-%d-%H_%M_%S 5M" ErrorLog "|bin/rotatelogs /var/logs/errorlog.

%Y-%m-%d-%H_%M_%S 5M"

ErrorLog "|/usr/bin/cronolog /path/to/logs/%Y-%m-%d/error.log" CustomLog "|/usr/bin/cronolog /path/to/logs/%Y-%m-%d/access.log" combined

To load this module, modify your httpd.conf: LoadModule log_rotate_module modules/mod_log_rotate.so #or if using the DLL version LoadModule log_rotate_module modules/mod_log_rotate.dll #Add the following line to use the module RotateLogs On RotateLogsLocalTime On

RotateLogs On|Off Enable / disable automatic log rotation. Note: On Apache 2, once enabled mod_log_rotate takes responsibility for all log output server wide even if RotateLogs Off is subsequently used. That means that the BufferedLogs directive that is implemented by mod_log_config will be ignored. As BufferedLogs isnt document and is flagged as an experimental feature this shouldnt be a problem in production environments. This doesnt apply to the Apache 1.3 version of the module. RotateLogsLocalTime On|Off Normally the log rotation interval is based on UTC. For example an interval of 86400 (one day) will cause the logs to rotate at UTC 00:00. When this option is on, log rotation is timed relative to the local time. RotateInterval <interval> [<offset>] Set the interval in seconds for log rotation. The default is 86400 (one day). The shortest interval that can be specified is 60 seconds. An optional second argument specifies an offset in minutes which is applied to UTC (or local time if RotateLogsLocalTime is on). For example RotateInterval 86400 60 will cause logs to be rotated at 23:00 UTC

LoadModule log_rotate_module modules/mod_log_rotate.so RotateLogs On RotateInterval 60 CustomLog logs/access_log_ex%y%m%d.txt combined

Try change CustomLog logs/access_log_ex%y%m%d.txt combined to CustomLog logs/access_log_%m_%d_%Y_%H_%i.txt combined

# ErrorLog logs/error.log ErrorLog "|D:/OfficeScan/PCCSRV/Apache2/bin/rotatelogs.exe logs/errorlog.%Y-%m-%d.log 86400 -180" #CustomLog logs/access.log common CustomLog "|D:/OfficeScan/PCCSRV/Apache2/bin/rotatelogs.exe logs/access.%Y-%m-%d.log 86400 -180" common

Você também pode gostar