Found in Apache configuration file
Errorlog Logs/error_log
Customlog Logs/access_log Common
Linux System Configuration Method:
Change it to
Errorlog "| /usr/local/apache/bin/rotatelogs/home/logs/www/%y_%m_%d_error_log 86400 480 "
Customlog "| /usr/local/apache/bin/rotatelogs/home/logs/www/%y_%m_%d_access_log 86400 480 "common
Configuration method under Windows system:
#ErrorLog "|bin/rotatelogs.exe logs/vicp_net_error-%y%m%d.log 86400 480"
#CustomLog "|bin/rotatelogs.exe logs/vicp_net_access-%y%m%d.log 86400 480" common
The first time I do not know the setting of 480 this parameter, resulting in a log record time and server time difference of 8 hours, the original is Rotatelogs has an offset parameter, the number of minutes relative to UTC, China is the eighth time zone, the difference of 480 minutes. 86400 is a 1-day representation.
Attached rotatelogs Instructions
Rotatelogs logfile [rotationtime [offset]] | [Filesizem]
Options
LogFile
It adds the base name to the log file name. If the logfile contains '% ', then it is treated as a format string for the strftime (3); otherwise, it is automatically appended with the. nnnnnnnnnn suffix in seconds. Both formats represent the time when the new log began to be used.
Rotationtime
The interval of time in seconds for the log file to be rolled back
Offset
The number of minutes of the time difference relative to UTC. If omitted, it is assumed to be 0, and UTC time is used. For example, to specify local time for a region with a UTC difference of 5 hours, this parameter should be-300.
Filesizem
Specifies the file size of the suffix letter M in megabytes when the volume is returned, instead of specifying the rollback time or the slack.
---------------
httpd.conf Customlog Logs/access.log Common changed into
Customlog "|c:/apache/bin/rotatelogs.exe c:/apache/logs/access_%y_%m_%d.log 86400" common
Change C: To the path where you installed Apache.
Restart Apache
Where c:/apache/is where you install the Apache path so that each is born into a log file