23
2009
Apache Log Format.
Apache logs :
Actually we have two types of log files in the apache server.
1. Access_log – used to store the information ,regarding the request served by the server.
2. error_log   - used to store the error information.
we can able to customize our own log format.
sample code:
LogFormat “%h %l %u %t \â€%r\†%>s %b†common
LogFormat “%h %l %u %t \â€%r\†%>s %bâ€
\â€%{Referer}i\†\â€%{User-agent}i\— combined
%h: The IP address of the client that sent the request to the web server, or the client’s hostname if you have HostNameLookups enabled
%u: The user id of the user who sent the request determined by HTTP authentication
%t: Time when the request was received by the server.
%r: Text of the original request line from the client including the HTTP method used, the resource requested, and the HTTP protocol version used by the client’s browser
%>s: The final HTTP request status code that the web server sends back to the client
%b: The size in bytes of the object sent to the client in response to the request excluding the response headers

An article by admin




