in reply to Re: High-level methods to low-level: Do I put them together?
in thread High-level methods to low-level: Do I put them together?

Thanks moo for the thinking about the log analyser code. I develop it for a customer that agreed to make it Open Source so it is available at sourceforge, with some docs too on what the objects do. The name of the analyser is a bit weird, because I didn't want to put it any of the CPAN namespaces. It's in beta, with a lot of out of date comments and other weird stuff; it's probably not of any use for others yet.

Regarding making the log analyser general, I only intended it for web server logs, however it is built to make statistics of any log file. The only assumption about what kind of log it should parse is that it should consist of lines (Monday correction: it assumes there is a date pattern too of a particular format). The line assumption could easily be taken away by changing the LogFile object. Categories are defined as a pattern and a title for the category, so you should be able to match anyting that is, er, matchable. You can also put in some code for each category (e.g. the Query module unescapes the query string, before storing statistics). Next step will be to put in a slot for a private data structure that can be used by an object to have a memory between lines, for recording sessions.

A lot of other stuff is hard coded, e.g. HTML.

/jeorgen

  • Comment on RE: Re: High-level methods to low-level: Do I put them together?