This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

ApacheLog

Apache log files.
Native log file format of the Apache web server.
Common variants are Apache Common Log and Apache Access Log.
Is used by MathLM, the Mathematica license manager.
Plain text format.
Stores information about web server transactions.
Represents each record as a line of text.
Allows user-customized record formats.
  • Import can read all common variants of the Apache log format, as well as Wolfram MathLM log files and user-customized log formats.
  • Import imports an Apache log file.
  • Import reads an Apache log file and returns the contents as a table.
  • Import imports the specified element from an Apache log file.
  • Import imports multiple elements.
  • The format must always be specified when importing Apache log files.
  • See the reference pages for full general information on Import.
"Elements"list of elements and options available in this file
"Rules"full list of rules for each element and option
"Options"list of rules for options, properties, and settings
  • Data representation element:
"Data"content of the file represented as a list of lists
  • Import by default uses the element for Apache log files.
  • Selecting individual data fields:
"Attachments"files attached to the message
"ByteCount"byte size of the object returned to the client
"Date"date and time of the transaction, given as a string
"Referrer"site the client reports having been referred from
"RemoteHost"IP address or hostname of the client
"RemoteUser"user ID of the client as determined by HTTP authentication
"RequestLine"the client request as a string, normally containing the path of the requested object and information about the protocol
"SessionID"a string that identifies the user session
"StatusCode"the status code that the server returns to the client, as defined in the HTTP specification (RFC2616)
"UserAgent"browser identification as reported by the client
"DataFormat"Automaticformat specification, given as a list of data representation elements and separators representing one record
  • To import a custom log format, can be used to specify the format of each record as a combination of data elements and record separators.
  • Import of Common Log files uses the setting
  • The default format of Access Log files is given by
Import an entire log file as a list of records:
Show the Import elements available in this file:
Read only the date fields:
Read all server requests:
Import an entire log file as a list of records:
In[1]:=
Click for copyable input
Out[1]=
Show the Import elements available in this file:
In[2]:=
Click for copyable input
Out[2]=
Read only the date fields:
In[3]:=
Click for copyable input
Out[3]=
Read all server requests:
In[4]:=
Click for copyable input
Out[4]=