tags:

views:

2692

answers:

9
+14  Q: 

Java Log Viewer

Hi all,

Unfortunately, sometimes the only way to debug a program is by going through its long log files.

I searched for a decent log viewer for a while now, and haven't found a real solution. The only program that seemed to be most appropriate was Chainsaw with its Socket connector but after a few short uses the program proved to be buggy and unresponsive at best.

For my purposes, a log viewer should at least be able to mark log levels (for example with different colors) and perform easy filtering based on packages and free-text.

Is there any other (free) log viewer? I'm looking for anything that could work well with log4j.

Thanks in advance!

+1  A: 

I've always used 'tail -f | grep re' or occasionaly 'awk'.

I'm not a big 'tail' expert, but AFAIK it won't be easy (or possible) to color log levels and/or filter by package name...
Nadav
+1  A: 

Depending on what platform you are running on and what other log viewing tools you have available, you can just use the appropriate log4j appender (syslog, Windows Event Logger) and just use your platform log viewing tools.

Other than that I have usually seen custom solutions developed.

Something that will drive your solution is what your overall system is like. Are you trying to aggregate logs from several computers? Or just view the logs from a single remote process?

John Meagher
I'm referring to textual log files that are located on the same machine. What I need to do is filter the information from the log file easily. What kind of custom solutions are you talking about?
Nadav
Basically replicating something along the lines of Chainsaw. I've done it where logs from multiple computers all go to a database and there's a little web UI for querying the DB.
John Meagher
A: 

You may want to use a custom log viewer that just works on files. I like Kiwi Log Viewer or Ganymede (an Eclipse plugin), but it's not hard to put a simple Swing app together that reads from the socket.

Will Sargent
+4  A: 

You didn't mention an OS, so I'll mention this though it is only on Windows.

Bare Metal Software makes a product called BareTail that has a nice interface and works well. They have a free version with a startup nag screen, a licensed version with no nag, and a pro version with additional features. It has configurable highlighting based on matching lines against keywords.

They also have a BareGrep product too, which provides similar grep capabilities. Both are excellent and very stable and better than anything I've seen on Windows. I liked them so much I bought the bundle with both pro versions for $50.

Joe Skora
+1  A: 

I've rolled out Splunk (http://www.splunk.com/) for log viewing and searching with great success. The free version can be used locally and the paid version can collect all your logs into one location. We use it mostly for Log4J logs but with lots of other formats as well.

Beyond tail and grep support (without needing to know grep...) it automatically indexes logs and allows easy analysis (e.g. # of events in last xx timeframe) as well as basic charting, alerting, and event aggregation.

I won't say that the app is perfect or that the company has matured yet. But I don't hesitate at all to recommend that you try it.

Jerry B
+6  A: 

Just wanted to say that I've finally found a tool that I can get along with just fine...

It's called LogExpert (see http://www.log-expert.de/) and is free. Besides the usual tail function, it also has a filter and a search function - two crucial things that are missing from BareTail. And if you happen to want to customize the way it parses columns further, it's dead simple. Just implement an interface in .NET and you're done (and I'm a Java/Flex programmer...)

Nadav
+1  A: 
Dima
A: 

Take a look to http://jlogviewer.sourceforge.net/ or http://sourceforge.net/projects/jlogviewer/ Java log viewer is lightweight GUI to easily view the java application logs generated by the "java.util.logging" package. It's open source!!

A: 

Check out XpoLog Center is a log viewer for java that can be deployed as a J2EE solution. You can find it at XpoLog Log Viewer

bobyg