Apache log does not log the specified format element
Apache does not record the logs that point to the elements of the site, why this is required, and under what circumstances it is necessary to do so:
When calculating the log PV, generally do not need to statistics picture element of the log, because, open a Web page is a PV, when the RS server does not want to record
From the front end is responsible for balancing health checks of useless logs, the entire configuration requires MOD_SETENVIF module support, below our case
Case 1:apache does not record the picture log
A: Because the statistics log PV when a page is counted as a PV, and picture js,css and so on is just the elements of the picture, if recorded in the log, and then statistics PV is not accurate according to the log. So consider not recording log information such as pictures
<filesmastch "\. (css|js|gif|jpg|ico|swf) ">
SETENV IMAG 1
<\FilesMastch>
The actual log configuration
Customlog "| /application/apache/bin/rotatelogs/application/apache/logs/www.access_%y%m%d.log 86400 "Combined env=! IMAG
####################
Case 2:RS server does not log load Balancing health Check logs
The virtual host does not log load balancing down health check files
Setenvif request_url "^/check\.txt$" DontLog
Customlog "| /application/apache/bin/rotatelogs/application/apache/logs/www.access_%y%m%d.log 86400 "Combined Env=!dontlog
#################################################
Statistics Apache log file information
Awk-f ' [\]\\[\] ' {print $} ' Access.log |sort|uniq-c|sort-n
Awk-f ' [\]\\[\] ' {++s[$2]} END {for (key in S) print S[key],key} ' Access.log |sort-n
This article is from the "Technology Change Destiny" blog, please be sure to keep this source http://lvnian.blog.51cto.com/7155281/1697864
Apache does not record logs for specified format elements