LogParser

Julia Package for Parsing Server Log Files


Keywords
julia, log-parser, apache-log-analysis, apache-logging, apache-log
License
Other

Documentation

LogParser

Build Status

LogParser.jl is a package for parsing server logs. Currently, only server logs having the Apache Combined format are supported (although Apache Common may parse as well). Additional types of logs may be added in the future as well.

LogParser.jl will attempt to handle the log format even if it is mangled, returning partial matches as best as possible. For example, if the end of the log entry is mangled, you may still get an IP address returned, timestamp and other parts that were able to be parsed.

Code examples

The API for this package is straightforward:

using LogParser, GZip

#Read in gzipped file
jbapachecombined = readdlm(gzopen(Pkg.dir("LogParser", "test", "data", "juliabloggers-apachecombined.gz")), '\t')

#Parse file
jbparsed = parseapachecombined(jbapachecombined)

#Convert to DataFrame if desired
jbparsed_df = DataFrame(jbparsed)

Licensing

LogParser.jl is licensed under the MIT "Expat" license