Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tool for reading glassfish logs?

I'm dealing with huge glassfish log files (in windows, eek!) and well ... Wordpad isn't cutting it.

Are there any tools out there that can handle these log files in a more intelligent manner? Functionality that would be welcome:

  • View all lines of a certain log level (info, warning, severe)
  • Show logs between two timestamps
  • Occurency counter (this exception was thrown 99 times between time x and time y)
like image 532
Ace Avatar asked Sep 26 '08 14:09

Ace


1 Answers

On Windows I'd still go perl or awk. Download and install cygwin, then use awk or whatever you are familiar with. awk has the time functions needed for filtering, and features such as getline for log file navigation.

Ex: Exception occurency count - all time

$ awk '/^java.*:\W/ {print $1}' server.log* |sort|uniq -c|sort -nr
 60 javax.ejb.EJBException:
 45 java.rmi.ServerException:
  2 javax.persistence.PersistenceException:
  2 javax.ejb.ObjectNotFoundException:
  1 java.lang.Error:
like image 171
fredarin Avatar answered Nov 09 '22 10:11

fredarin