This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
Mathematica Import/Export Format


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["file", "ApacheLog"] imports an Apache log file.
  • Import["file", "ApacheLog"] reads an Apache log file and returns the contents as a table.
  • Import["file", {"ApacheLog", elem}] imports the specified element from an Apache log file.
  • Import["file", {"ApacheLog", {elem1, elem2, ...}}] imports multiple elements.
  • The format "ApacheLog" 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 "Data" element for Apache log files.
  • Selecting individual data fields:
"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
"Attachments"files attached to the message
"DataFormat"Automaticformat specification, given as a list of data representation elements and separators representing one record
  • To import a custom log format, "DataFormat" 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 "DataFormat" -> {"RemoteHost", " ", "ClientID", " ", "RemoteUser", " " , "Date", " \"", "RequestLine", "\" ", "StatusCode", " " , "ByteCount"}.
  • The default format of Access Log files is given by {"RemoteHost", " ", "ClientID", " ", "RemoteUser", " " , "Date", " \"", "RequestLine", "\" ", "StatusCode", " " , "ByteCount", " \"", "Referrer", "\" \"", "UserAgent", "\""}.