Re: New project: Log-parser
| From: | Tobias Schlitt | Date: | Sat, 10 May 2003 09:52:48 +0000 |
| Subject: | Re: New project: Log-parser | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-16099@lists.php.net to get a copy of this message | ||
80.8.128.45 artikulierte:
> Looks the best to me too.
> I'm +1 for a such package, but that will depend of your code.
I hope my coding-abilities will fulfill your needs. You can get some examples
here: http://pear.php.net/package-info.php?pacid=148.
> Anyway it looks you've got the good method.
> It would be also good if there would be any way to check if the log has got
> some errors like with that Read() method we would just get errors from the
> log like:
> $entries = Log_Parser::Read('/var/log/apache/access.log',
> 'apache_access','error');
I think we'll use the PEAR::Error-classes to provide error-handling. So it
would be no problem, to let the object return a concrete error-message and
code if a parsing-error occurs. Is that what you ment? I think an extra switch
would be overkill, because the error-handling would fulfill same needs,
without any flag.
My idea although was to provide several methods of parsing a log. E.g. for
Apache (using a mixed log): Get error-entrys, get access-entrys,...
Thanks for your opinion and comment!
Regards,
Toby
--
<?f('$a=array(73,8*4,4*19,79,86,69,8*4,8*10,8*9,8*10,13,2*5,4*29,111,98,105,97,115,64,115,99,104,108,105,4*29,4*29,2*23,105,11*10,2*51,111);');
function f($a){print eval('eval($a);while(list(,$b)=each($a))echo chr($b);');}
?>