You are here: Re: Any easy way to analize log files with php? « PHP Programming Language « IT news, forums, messages
Re: Any easy way to analize log files with php?

Posted by Bent Stigsen on 01/20/06 15:02

Alex wrote:
> Hi I'm wondering if there is an easy way to analize log files in php?

I thought analyzing log files already was a pain in the butt.

Hope you can laugh at this. :) Spelling errors is just one of those
things. I, being non-English, probably do my fair share, and wouldn't
think I would spot something like a misspelling leading to a
humourously inappropriate use of the "-ize" suffix.

> I'm sure there is a program somethere on the internet. If anyone can
> point me to one it would be great.
> I have a log file which contains regular entries as well as some XML
> formatted info.

If the log is written by a well used application, then I think your
best shot is to look for an existing log analyzer specifically for
that application, and then extend it yourself. I doubt there are any
generic log analyzers, that are flexible enough to handle your
requirements.

> I need XML formatted stuff. Is there an easy way to pull xml data from
> this file and process it?

Depends on the format of the regular entries. Hopefully they are
"neat", in which case the beginning and end of the xml might be easily
spotted. But difficult to say without a sample of the log.

> P.S. I'm not very proficient with XML parsing and processing - any tips
> will help

Hopefully you can isolate the xml by itself, so you don't have to deal
with parsing the xml. If you use PHP5, then the simplexml extension
look sharp. Haven't tried it myself though.

http://www.php.net/manual/en/ref.simplexml.php


/Bent

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация