Common Log Format
   HOME

TheInfoList



OR:

For computer
log management Log management (LM) comprises an approach to dealing with large volumes of computer-generated log messages (also known as audit records, audit trails, event-logs, etc.). Log management generally covers: * Log collection * Centralized log agg ...
, the Common Log Format, also known as the NCSA Common log format, (after
NCSA HTTPd NCSA HTTPd is an early, now discontinued, web server originally developed at the NCSA at the University of Illinois at Urbana–Champaign by Robert McCool and others. First released in 1993, it was among the earliest web servers developed, follo ...
) is a standardized
text file A text file (sometimes spelled textfile; an old alternative name is flatfile) is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists stored as data within a computer file system. In operating ...
format used by
web server A web server is computer software and underlying hardware that accepts requests via HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, commonly a web browser or web crawler, initiate ...
s 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 The Webalizer is web log analysis software, which generates web pages of analysis, from access and usage logs. It is one of the most commonly used web server administration tools. It was initiated by Bradford L. Barrett in 1997. Statistics common ...
and
Analog Analog or analogue may refer to: Computing and electronics * Analog signal, in which information is encoded in a continuous variable ** Analog device, an apparatus that operates on analog signals *** Analog electronics, circuits which use 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
referer In HTTP, "" (a misspelling of Referrer) is an optional HTTP header field that identifies the address of the web page (i.e., the URI or IRI), from which the resource has been requested. By checking the referrer, the server providing the new web p ...
and
user-agent In computing, a user agent is any software, acting on behalf of a user, which "retrieves, renders and facilitates end-user interaction with Web content". A user agent is therefore a special kind of software agent. Some prominent examples of us ...
fields.


Example

127.0.0.1 user-identifier frank 0/Oct/2000:13:55:36 -0700"GET /apache_pb.gif HTTP/1.0" 200 2326 A dash () in a field indicates missing data. * is the IP address of the client (remote host) which made the request to the server. * is the RFC 1413
identity Identity may refer to: * Identity document * Identity (philosophy) * Identity (social science) * Identity (mathematics) Arts and entertainment Film and television * ''Identity'' (1987 film), an Iranian film * ''Identity'' (2003 film), ...
of the client. Usually "-". * is the userid of the person requesting the document. Usually "-" unless .htaccess has requested authentication. * is the date, time, and time zone that the request was received, by default in strftime format . * is the request line from the client. The method , the resource requested, and the
HTTP protocol The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, ...
. * is the
HTTP status code This is a list of Hypertext Transfer Protocol (HTTP) response status codes. Status codes are issued by a server in response to a client's request made to the server. It includes codes from IETF Request for Comments (RFCs), other specifications, ...
returned to the client. 2xx is a successful response, 3xx a redirection, 4xx a client error, and 5xx a server error. * is the size of the object returned to the client, measured in
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable unit ...
s.


Usage

Log files are a standard tool for computer systems developers and administrators. They record the "what happened, when, by whom" of the system. This information can record faults and help their diagnosis. It can identify security breaches and other computer misuse. It can be used for auditing. It can be used for accounting purposes. The information stored is only available for later analysis if it is stored in a form that can be analysed. This data can be structured in many ways for analysis. For example, storing it in a relational database would force the data into a query-able format. However, it would also make it more difficult to retrieve if the computer crashed, and logging would not be available unless the database was available. A plain text format minimises dependencies on other system processes, and assists logging at all phases of computer operation, including start-up and shut-down, where such processes might be unavailable.


See also

*
Extended Log Format Extended Log Format (ELF) is a standardized text file format that is used by web servers when generating log files. In comparison to the Common Log Format (CLF), ELF provides more information and flexibility. Example #Version: 1.0 #Date: 12-Jan- ...
*
Log management and intelligence Log management (LM) comprises an approach to dealing with large volumes of computer-generated log messages (also known as audit records, audit trails, event-logs, etc.). Log management generally covers: * Log collection * Centralized log aggr ...
*
Web log analysis software Web log analysis software (also called a web log analyzer) is a kind of web analytics software that parses a server log file from a web server, and based on the values contained in the log file, derives indicators about when, how, and by whom a web ...
*
Web counter A web counter or hit counter is a publicly displayed running tally of the number of visits a webpage has received. Web counters are usually displayed as an inline digital image or in plain text. Image rendering of digits may use a variety of ...
*
Data logging A data logger (also datalogger or data recorder) is an electronic device that records data over time or about location either with a built-in instrument or sensor or via external instruments and sensors. Increasingly, but not entirely, they ar ...
*
Syslog In computing, syslog is a standard for message logging. It allows separation of the software that generates messages, the system that stores them, and the software that reports and analyzes them. Each message is labeled with a facility code, i ...


References


External links

* * * {{cite web , url=http://www.w3.org/TR/WD-logfile , title=Extended Log File Format , work=W3C Working Draft WD-logfile-960323 , publisher=
W3C The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working to ...
, date=1996-03-23 , accessdate=2013-05-07 Log file formats