Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Any easy way to analize log files with php?
January 19, 2006, 10:59 pm
rate this thread
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
I need XML formatted stuff. Is there an easy way to pull xml data from
this file and process it?
P.S. I'm not very proficient with XML parsing and processing - any tips
Re: Any easy way to analize log files with 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.
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
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.
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.