SIDEBAR
»
S
I
D
E
B
A
R
«
Log viewing programs
Feb 22nd, 2008 by sleepikatkat

I’ve been using log4j for years. Viewing those long files have been a pain no matter what projects I worked on.  It’s not the format itself, but just long long lines and even longer files…

Windows by default opens .log in NotePad, which isn’t designed to handle large text files.  Try opening a 5mb text file.  NotePad is going to hang.  What a pain.

I’ve been using NotePad++ and TextPad for quite a while and have grown to depend on them quite a bit.  NotePad++ is light weight and fast.  I highly recommend using it as replacement of Windows NotePad.  It has syntax highlight and can handle large files.  TextPad has syntax highlight as well.  But biggest advantage of it is the ability to do automatic reload when the file is changed from external sources.  That works very well with log files.  I have yet to find another text editor that can do auto reload as well.  Both software can do file edits (trim line, convert tabs to spaces and vice versa), find ASCII values of characters, number conversions in hex, oct, etc.

Having NotePad++ and TextPad definitely beats opening logs in WordPad or NotePad.  Sometimes I prefer to read the logs from within IDEs.  This, surprisingly, has a lot more options.  There are a number of plug-ins for Eclipse and IntelliJ to read (and tail) log files.  These log viewers work the best when you are running/debugging the application from within the IDE.

But still, imagine having to scroll 10000 lines just to find the part that you are looking for.  No matter how good TextPad and NotePad++ are, the log is still in black text white background (actually you can change the colors and fonts, too).  Every line looks just about the same as the rest!  I get dizzy having to stare at them.

Just yesterday, I found my new best friend with log files: LogMX.  It’s not free, but it’s a much better tool to view log4j logs.  Just specify the pattern that’s in the log4j/log4net config file, and open the log file.  You can let it reload the log, or suspend it any time.  Different levels of severity are in different colors, so any warning or errors REALLY stand out.  Not to mention the ability to filter the log for just certain packages and certain severity level.  Man I fell in love with it so fast and so hard that I was was telling my teammates about it the very next day!

Maybe there’s something even better out there for viewing logs, especially for log4j and log4net logs because they are so common in the development world.  Anybody knows any?  I would love to try them out.

  • Share/Bookmark
»  Substance:WordPress   »  Style:Ahren Ahimsa