I am writing a log analyzer program which is supposed to plot a graph on search string against time after parsing log file(s). I am currently clueless about how would I parse and store the log file so that it could be processed to create multiple outputs, now I am parsing the entire log file all the time and process to do this – any suggestions?
A:
Don't.
Use either Apache Chainsaw - http://logging.apache.org/chainsaw/index.html - or Lilith - http://lilith.huxhorn.de/ - to parse and view your log files.
You can preprocess your logfiles easily with Perl.
Thorbjørn Ravn Andersen
2009-11-16 20:14:49
A:
Probably the easiest thing to do is to write a file for each search string. In the file write each timestamp where the string occurs. Then process these files to create a list of search strings and counts. You can then process these files to produce the graphs you want.
Hugh Brackett
2009-11-16 20:17:56
+1
A:
In Java, I would look at JFreeChart for drawing graphs once you've parsed the log.
Alex Miller
2009-11-16 20:34:41
A:
You could use the Pentaho suite to do this, its open source java with good backing and usage.
- Use Pentaho Kettle to bulk load into MySql
- Use Report Designer to pull out the stats into a pretty picture
crowne
2009-11-16 20:40:27