ExtendedLog
Background & Context
-
- Extended Log Format.
- Customizable log format for advanced logging.
- Plain text format.
- Represents each record as a line of text.
- Developed by W3C.
Import
- Import["file","ExtendedLog"] imports a log file as a Tabular object.
- Import["file",{"ExtendedLog",elem}] imports the specified element.
- Import["file",{"ExtendedLog",elem,subelem1,…}] imports subelements subelemi, useful for partial data import.
- The format "ExtendedLog" must always be specified when importing extended log files.
- See the following reference pages for full general information:
-
Import import from a file CloudImport import from a cloud object ImportString import from a string ImportByteArray import from a byte array
Import Elements
- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements - Data representation elements:
-
"Data" two-dimensional array "Dataset" table data as a Dataset "EventSeries" table data as an EventSeries "Tabular" a Tabular object "TimeSeries" table data as a TimeSeries - Import by default uses the "Tabular" element.
- Subelements for partial data import for the "Tabular" element can take row and column specifications in the form {"Tabular",rows,cols}, where rows and cols can be any of the following:
-
n nth row or column -n counts from the end n;;m from n through m n;;m;;s from n through m with steps of s {n1,n2,…} specific rows or columns ni - Column specifications can also be any of the following:
-
"col" single column "col" {col1,col2,…} list of column names coli - Data descriptor elements:
-
"ColumnLabels" names of columns "ColumnTypes" association with data type for each column "Schema" TabularSchema object - Columns or identifiers typically present in an extended log file are:
-
"Date" date of the request "Time" time of the request "ClientToServerUsername" name of the client accessing the server or an IP number "ClientIP" IP address of the client "ClientToServerMethod" the HTTP method used "ClientToServerURIStem" URI stem only, without the query "ClientToServerURIQuery" query portion only "ServerToClientStatus" the HTTP status code returned to the client "TimeTaken" time to complete the transaction in seconds - Metadata elements:
-
"ColumnCount" number of columns stored in file "Dimensions" data dimensions "RowCount" number of rows stored in file
Import Options
- General Import options:
-
"Schema" Automatic schema used to construct Tabular object "TimeColumn" Automatic column to use for times in "EventSeries" and "TimeSeries" elements - Possible settings for the "Schema" option include:
-
schema a complete TabularSchema specification propval a schema property and value (see reference page for TabularSchema) <|"prop1"val1,…|> an association of schema properties and values
Examples
open all close allBasic Examples (2)
Import a log file as a Tabular:
Import["ExampleData/extended.log", "ExtendedLog"]Import["ExampleData/extended.log", {"ExtendedLog", "Summary"}]Scope (2)
Import metadata from a log file:
Import["ExampleData/extended.log", {"ExtendedLog", "Dimensions"}]Import["ExampleData/extended.log", {"ExtendedLog", "ColumnTypes"}]Import a sample row of a log file:
Import["ExampleData/extended.log", {"ExtendedLog", "Data", 10}]Import Elements (25)
"ColumnCount" (1)
"ColumnLabels" (1)
"ColumnTypes" (1)
"Data" (7)
Import a log file as a 2D list of values:
Import["ExampleData/extended.log", {"ExtendedLog", "Data"}]Import a single row from a log file:
Import["ExampleData/extended.log", {"ExtendedLog", "Data", 5}]Import["ExampleData/extended.log", {"ExtendedLog", "Data", {1, 5, 7}}]Import["ExampleData/extended.log", {"ExtendedLog", "Data", 1 ;; 5}]Import a single element at a given row and column:
Import["ExampleData/extended.log", {"ExtendedLog", "Data", 5, 2}]Import["ExampleData/extended.log", {"ExtendedLog", "Data", All, 2}]Import selected columns using column names:
Import["ExampleData/extended.log", {"ExtendedLog", "Data", All, {"ClientIP", "Time"}}]"Dataset" (2)
Import a log file as a Dataset:
Import["ExampleData/extended.log", {"ExtendedLog", "Dataset"}]Import selected columns using column names:
Import["ExampleData/extended.log", {"ExtendedLog", "Dataset", All, {"ClientIP", "Time"}}]"Dimensions" (1)
"EventSeries" (1)
Import a log file as an EventSeries:
Import["ExampleData/extended.log", {"ExtendedLog", "EventSeries"}]Import a single row from a log file:
Import["ExampleData/extended.log", {"ExtendedLog", "EventSeries", 5}]Import some specific rows from a log file:
Import["ExampleData/extended.log", {"ExtendedLog", "EventSeries", {1, 5}}]Import the first 10 rows of a log file:
Import["ExampleData/extended.log", {"ExtendedLog", "EventSeries", 1 ;; 10}]Import only selected columns using column names:
Import["ExampleData/extended.log", {"ExtendedLog", "EventSeries", All, {"Date", "ClientIP", "ClientToServerMethod"}}]"RowCount" (1)
"Schema" (1)
Get the TabularSchema object:
Import["ExampleData/extended.log", {"ExtendedLog", "Schema"}]"Summary" (1)
"Tabular" (7)
Import a log file as a Tabular object:
Import["ExampleData/extended.log", {"ExtendedLog", "Tabular"}]Import["ExampleData/extended.log", {"ExtendedLog", "Tabular", 5}]Import["ExampleData/extended.log", {"ExtendedLog", "Tabular", {1, 5, 7}}]Import["ExampleData/extended.log", {"ExtendedLog", "Tabular", 1 ;; 5}]Import a single element at a given row and column:
Import["ExampleData/extended.log", {"ExtendedLog", "Tabular", 5, 2}]Import["ExampleData/extended.log", {"ExtendedLog", "Tabular", All, 2}]Import selected columns using column names:
Import["ExampleData/extended.log", {"ExtendedLog", "Tabular", All, {"ClientIP", "Time"}}]"TimeSeries" (1)
Import a log file as a TimeSeries:
Import["ExampleData/extended.log", {"ExtendedLog", "TimeSeries"}]Import a single row from a log file:
Import["ExampleData/extended.log", {"ExtendedLog", "TimeSeries", 5}]Import some specific rows from a log file:
Import["ExampleData/extended.log", {"ExtendedLog", "TimeSeries", {1, 5}}]Import the first 10 rows of a log file:
Import["ExampleData/extended.log", {"ExtendedLog", "TimeSeries", 1 ;; 10}]Import only selected columns using column names:
Import["ExampleData/extended.log", {"ExtendedLog", "TimeSeries", All, {"Date", "ClientIP", "ClientToServerMethod"}}]Import Options (3)
"Schema" (2)
Import automatically infers column labels and types from data stored in a log file:
tab = Import["ExampleData/extended.log", "ExtendedLog"]tab["ColumnTypes"]Use the "Schema" option to specify column labels and types:
tab = Import["ExampleData/extended.log", "ExtendedLog", "Schema" -> {"ColumnKeys" -> {"Date", "Time", "ClientToServerUsername", "ClientIP", "ClientToServerMethod", "ClientToServerURIStem", "ClientToServerURIQuery", "ServerToClientStatus", "TimeTaken"}, "ElementType" -> {"Date" -> "Date", "Time" -> "Time", "TimeTaken" -> "Real32"}}]tab["ColumnTypes"]"TimeColumn" (1)
By default, the time column is selected automatically for "TimeSeries" and "EventSeries" elements:
Import["ExampleData/extended.log", {"ExtendedLog", "TimeSeries"}]Use the "TimeColumn" option to specify the time column:
Import["ExampleData/extended.log", {"ExtendedLog", "TimeSeries"}, "TimeColumn" -> "Time"]History
Introduced in 2025 (14.3) | Updated in 2026 (15.0)