Table of Contents

About

A page about the format or structure of log file.

Structure

  • message (a piece of text which is the only mandatory data)
  • date
  • and custom attributes such as:

Known Format

Most format are single line.

Apache Common Log Format

Log - Apache Common Log Format

Example:

  • for this configuration:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
  • you get:
127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 2326 "http://www.example.com/start.html" "Mozilla/4.08 [en] (Win98; I ;Nav)"

Labeled Tab-separated Values (LTSV)

Labeled Tab-separated Values (LTSV) add a label

Format:

  • Each record is represented as a single line.
  • Each field is separated by TAB and has a label and a value. The label and the value have been separated by ':'.

Example:

  • for this configuration
LogFormat "host:%h\tident:%l\tuser:%u\ttime:%t\treq:%r\tstatus:%>s\tsize:%b\treferer:\%{Referer}i\tua:%{User-Agent}i" combined_ltsv
  • you get
host:127.0.0.1<TAB>ident:-<TAB>user:frank<TAB>time:[10/Oct/2000:13:55:36 -0700]<TAB>req:GET /apache_pb.gif HTTP/1.0<TAB>status:200<TAB>size:2326<TAB>referer:http://www.example.com/start.html<TAB>ua:Mozilla/4.08 [en] (Win98; I ;Nav)

Jsonl

Csv

Tools

See Ideolog