LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%h %l %u %t \"%r\" %>s %b" \"%{Referer}i\" \"%{User-agent}i\"" combined The LogFormat directive allows you to tell Apache which aspects of the request you want to record. You will still need additional directives to tell Apache where to log that information, but that is addressed in the next section. This example shows the configuration for the two most popular formats, the Common Log Format and the Combined Log Format. When Apache receives a request, it will substitute each one of the fields prefixed by a % with the corresponding request attribute. If you are using the CLF, each entry in your log file will look like this: 192.168.200.4 - someuser [12/Jun/2005:08:33:34 +0500] "GET /example.png HTTP/1.0" 200 1234 If you are using the combined common format, each entry in your log file will look like this: 192.168.200.4 - someuser [12/Jun/2005:08:33:34 +0500] "GET /example.png HTTP/1.0" 200 1234 http://www.example.com/index.html "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7)" Although the appendix provides a comprehensive logging format reference, this list describes the most important fields:
The combined log format extends the common log format with two additional fields. It is defined as
|