Hi,

I posted a quick parser for Apache's common log format here:

  https://gitorious.org/guile-clf

Use like this:

    (use-modules (clf))

    (define (counter-analysis)
      (make-analysis (lambda (line count) (1+ count)) 0))

    (call-with-input-file "/var/log/apache2/$site/access.log"
      (lambda (p)
        (analyze-logs! p (list (counter-analysis)))))
    => (#<<analysis> proc: #<procedure ... (line count)> seed: 3020186>)

So, a lot of work just to say there are 3M lines in this file.  Write
your own passes to do other things.  I'll add to it over time, but if
you have an interesting one, send me a pull request ;)

Andy
-- 
http://wingolog.org/

Reply via email to