From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id BDC44BBAF for ; Thu, 14 Oct 2010 20:23:16 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnMFAKjntkzUSnIBkWdsb2JhbACTMIdbgQKFHRUBAQEBCQsKBxEDH8E+hUgEikaCeQ X-IronPort-AV: E=Sophos;i="4.57,331,1283724000"; d="scan'208";a="72839594" Received: from mk-outboundfilter-5.mail.uk.tiscali.com ([212.74.114.1]) by mail2-smtp-roc.national.inria.fr with ESMTP; 14 Oct 2010 20:23:14 +0200 X-Trace: 316467158/mk-outboundfilter-5.mail.uk.tiscali.com/PIPEX/$PIPEX-ACCEPTED/pipex-temporary-group/79.69.197.56/None/gaius@gaius.org.uk X-SBRS: None X-RemoteIP: 79.69.197.56 X-IP-MAIL-FROM: gaius@gaius.org.uk X-SMTP-AUTH: X-Originating-Country: GB/UNITED KINGDOM X-MUA: Apple Mail (2.936) X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As4BAOrmtkxPRcU4/2dsb2JhbAAHkynQGIVIBIpGgnk X-IronPort-AV: E=Sophos;i="4.57,331,1283727600"; d="scan'208";a="316467158" X-IP-Direction: IN Received: from 79-69-197-56.dynamic.dsl.as9105.com (HELO [192.168.1.3]) ([79.69.197.56]) by smtp.pipex.tiscali.co.uk with ESMTP; 14 Oct 2010 19:23:13 +0100 Cc: caml-list@inria.fr Message-Id: <6F100B00-6366-490D-BB54-44729BF201CA@gaius.org.uk> From: Gaius Hammond To: oliver@first.in-berlin.de In-Reply-To: <20101011135422.GC6256@first.in-berlin.de> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: [Caml-list] OPLP: Ocaml APache Log Parser Date: Thu, 14 Oct 2010 19:23:13 +0100 References: <4CB3150D.6020402@gmail.com> <20101011135422.GC6256@first.in-berlin.de> X-Mailer: Apple Mail (2.936) X-Spam: no; 0.00; ocaml:01 parser:01 in-berlin:01 0100,:01 parser:01 bug:01 ocaml:01 sscanf:01 cheers:01 wrote:01 wrote:01 oliver:01 caml-list:01 patches:03 let:03 On 11 Oct 2010, at 14:54, oliver@first.in-berlin.de wrote: > On Mon, Oct 11, 2010 at 02:45:49PM +0100, Chris Yocum wrote: >> Dear Everyone, >> >> I just wanted to let Ocaml'ers know that I am currently working on an >> apache combined log parser. It is still in very early stages of >> development but patches/comments/feature requests/bug reports are >> very >> welcome. The code lives on github (http://github.com/cyocum/OPLP). > [...] > > Aha... long ago I had done something similar, and it had an sql-like > language for using it. I do something like this, but using OCaml to load a logfile into SQLite, and analyze it with "real" SQL. http://gaiustech.wordpress.com/2010/09/12/analyzing-logfiles-1/ Probably my technique using sscanf wouldn't be fast enough for something as big as an Apache log that might have a million lines. Cheers, G