By reorganizing the input logs according to the file name template and current date, the required logs can be generated in the format.cronolog is designed to work with a Web server, such as Apache, Nginx 2.1 Configuration Format CustomLog "| cronolog Absolute path log file path for commands/Site Name%Y%m%d.log " combinedĮrrorLog "| cronolog Absolute path log file path for commands/Site Name-error %Y%m%d.log"Ģ.2 Configuration Split ~]# tar zxf cronolog-1.6.2.tar.gz -C ~]# cd cronolog-1.6.2]# cronolog-1.6.2]# make & make ~]# which ~]# vi /etc/httpd/conf/nfĬustomLog "| /usr/local/sbin/cronolog logs/apache_cron_access_%y%m%d.log" combinedĮrrorLog "| /usr/local/sbin/cronolog ~]# systemctl restart ~]# cd logs]# date rw-r-r- 1 root root 916 Nov 24 19:12 apache_error_201124.logĬronolog, as a log filter, can be used to cut linux Log files. rw-r-r- 1 root root 81 Nov 24 19:12 access_log 1.2 Configuration Split ~]# vi /etc/httpd/conf/nfĬustomLog "| /usr/sbin/rotatelogs -l logs/apache_access_%y%m%d.log 86400" combinedĮrrorLog "| /usr/sbin/rotatelogs -l logs/apache_error_%y%m%d.log ~]# systemctl start ~]# cd logs]# date
Specifies to scroll by filesizeM file size instead of by time or time difference. Minutes of time difference relative to UTC.If omitted, then "0" is assumed and UTC time is used.If you want to use Beijing Time, you need to set it to 480, because Beijing Time = UTC+8 hours, 480 seconds The interval in seconds between log file scrolls. It is the log file name with the base name.If the logfile contains'%', it will be treated as a format string for strftime() otherwise, it will be automatically suffixed with the'.nnnnnnnnnn nnnn'suffix in seconds.Both formats represent the time at which new logs begin to be used. Use local time instead of GMT time as the time base. Configure the log files for the site to be forwarded to rotatelogs for split processing.Split tool with rotatelogs 1.1 Related Parameters Apache comes with rotatelogs splitting toolġ.
The following describes how both methods can be implemented In addition, if the server encounters a failure, the maintenance staff will open the log file for analysis, which will take a long time to open and will inevitably increase the time to process the failure.So managing these huge volumes of logs is very important for your website, and we'll automatically split Apache's logs into daily dates. This will also lose a lot of valuable information on the Web site, which can be used for access analysis, network security monitoring, network health monitoring, and so on. If the log file is not split, the whole log file will be deleted if it takes up a lot of disk space. Setup ('/etc/awstats/nf' file, web server or permissions) may be wrong.Ĭheck config file, permissions and AWStats documentation (in 'docs' directory).With more and more visits to the site, Apache by defaultThe single log file generated by the server will become larger and larger. This means each line in your web server log file need to have the following personalized log format:Īnd this is an example of records AWStats found in your log file (the record number 50 in your log): %host %time1 %methodurl %code %bytesd %other %other Your log file /var/log/spdy/spdy.log must have a bad format or LogFormat parameter setup does not match this format.
This is the error I getĪWStats did not find any valid log lines that match your LogFormat parameter, in the 50th first non commented lines read of your log. views/home/login/ login_fieldset.html HTTP/1.1" 200 10180 "" stream ID: 73 - priority: 2Ĭan anyone let me know what is going wrong here. I'm using a node.js proxy server whose log is as follows What should be LogType for a custom proxy server.