Re: New project: Log-parser
| From: | Xavier Noguer | Date: | Sat, 10 May 2003 09:56:53 +0000 |
| Subject: | Re: New project: Log-parser | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-16107@lists.php.net to get a copy of this message | ||
--------- Original Message --------
From: toby@php.net
>
> Martin Jansen artikulierte:
>
> > I guess he is talking about filtering the logfile, so that only error
> > message are returned, but no notices et al.
>
> I mentioned that in my post too. Filtering should be possible. The problem
is,
> that filtering-criteria are also log-dependend... So, wie have to look for
a
> unified API, but implementing wholy different possibillities for each
log-type.
First thing that came to my mind when I read your post was: "great, now I'll
be able to parse that stupid customized log I have in that old application
of mine".
So, here is the question: have you thought about parsing not just known log
formats (apache et al) but any log?
My first thought was to pass some kind of config object to the parser for
defining the format:
$entries = Log_Parser::Read('/var/log/mylog',$config);
Don't know what to use for the config really, because as far as I know order
of element/option is irrelevant for most config file formats (xml, .ini,
etc...).
What do you think of that idea?
Xavier