Skip to content

tcurdt/http-log-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LogParser

<img src=“https://travis-ci.org/tcurdt/http-log-parser.svg” alt=“Build Status” />

Introduction

This gem provides an easy to use parser to various HTTP log formats.

Installation

Just run:

gem install http-log-parser

That should take care of it.

Usage

require 'http_log_parser'

parser = HttpLogParser.new

File.open('/path/to.log', 'r:ascii-8bit') do |file|
  while(line = file.gets)
    parsed_data = parser.parse_line(line)
    p parsed_data
  end
end

Testing

bundle install --path vendor/bundle
rake test

License

This code is made availablie under the MIT license. It is based on based on code from Jan Wikholm.

Releases

No releases published

Packages

No packages published

Languages