Skip to content
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

NCSA Logparser

This implementation of an NCSA Common and NCSA Combined log file parser is intended to accompany the Safari Books Online blog series High-performance Log Parsing in Haskell (part 1 and part 2).

This code is provided under a BSD3 open source license and forking and modifying of this library to suit your purposes is encouraged.

Getting Started

There are a couple of pre-installation steps that vary depending on your platform.

OS X

  1. Install the OS X GHC and Cabal
  2. Install the PCRE library: ?> brew install pcre

Ubuntu

  1. Install the linux GHC and Cabal
  2. Install the PCRE library: ?> sudo apt-get install libpcre3-dev

Sandbox Setup

Once these platform-specific steps are done, you can use cabal, Haskell's package management and build system to do the rest. Run cabal commands from the root directory of the project after you clone it from GitHub. Begin by installing the project's dependencies and setting up a cabal sandbox:

?> cd /path/to/repo/checkout/ncsa-logparse
?> cabal sandbox init  # Initialize a cabal sandbox
?> cabal update  #  This will download the most recent list of packages.
?> cabal install --only-dependencies  # Install the project's dependencies

The install step will take a some time as all dependencies are bing downloaded and compiled. When that step is complete, you can build the project:

?> cabal build

This project builds an executable called ncsa-logparse that will be located in the dist/build/ directory which the build step creates.

Testing

The project includes a test suite. The command cabal test will run the suite and output the results.

About

NCSA Logfile Parser in Haskell

Resources

License

Stars

Watchers

Forks

Packages

No packages published