Jump to content

Common Log Format

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 2001:8003:2df1:9f00:ed73:f2fa:577b:db2 (talk) at 09:11, 21 April 2021. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The Common Log Format,[1] also known as the NCSA Common log format,[2] (after NCSA_HTTPd) is a standardized text file format used by web servers when generating server log files. Because the format is standardized, the files can be readily analyzed by a variety of web analysis programs, for example Webalizer and Analog.

Each line in a file stored in the Common Log Format has the following syntax:

host ident authuser date request status bytes

The format is extended by the Combined Log Format with referrer and user-agent fields.

Example

127.0.0.1 user-identifier frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326

A "-" in a field indicates missing data.

  • 127.0.0.1 is the IP address of the client (remote host) which made the request to the server.
  • user-identifier is the RFC 1413 identity of the client. Usually "-".
  • frank is the userid of the person requesting the document. Usually "-" unless .htaccess has requested authentication.
  • [10/Oct/2000:13:55:36 -0700] is the date, time, and time zone that the request was received, by default in strftime format %d/%b/%Y:%H:%M:%S %z.
  • "GET /apache_pb.gif HTTP/1.0" is the request line from the client. The method GET, /apache_pb.gif the resource requested, and HTTP/1.0 the HTTP protocol.
  • 200 is the HTTP status code returned to the client. 2xx is a successful response, 3xx a redirection, 4xx a client error, and 5xx a server error.
  • 2326 is the size of the object returned to the client, measured in bytes.

Usage

rida rida


See also

References

  1. ^ "Logging in W3C httpd". World Wide Web Consortium. 1995-10-12. Retrieved 2015-04-16.
  2. ^ "Log File Formats: NCSA Common". IBM. 2004-05-19. Retrieved 2013-05-07.