Java Log Viewer

JavaLog4jViewer

Java Problem Overview


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.

Java Solutions


Solution 1 - Java

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...)

Solution 2 - Java

I'm using OtrosLogViewer. You can mark log events manually or using string/regular expression. You can filter events based on level, time thread, string or regular expression. Logs can be imported by listening on socket or connecting to Log4j SocketHubAppender

You can take a look at Youtube video or screenshots: Marked log events Class filter

Disclaimer: I am the author of OtrosLogViewer

Solution 3 - Java

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.

Solution 4 - Java

I am using Notepad++ with my custom log file highlighting UDL. Looks like this:

enter image description here

Solution 5 - Java

You can try [logFaces][1], it has fantastic real-time log viewer based on eclipse-like design.

![alt text][2]

Disclosure: I am the author of this product.

[1]: http://www.moonlit-software.com "logFaces" [2]: https://www.moonlit-software.com/logfaces/web/images/screens/full/layout.png

Solution 6 - Java

Consider to use Log4j viewer eclipse plugin - that was fork of Ganemede plugin in the begging and now have more features and stability was improved significantly, and still in active development and free :)

Solution 7 - Java

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

Solution 8 - Java

LogSaw based on Eclipse and free. Log4j log file analyzer, simple to use with easy filtering. Supports several flavors of log4j log files: JBoss, Log4j pattern layout, Log4j XML layout, WebSphere.

Works like a charm. After couple of hours googling and trying several recommended free log4j viewers, this one was pleasant surprise. Have tried Chainsaw, BareTail, Insight, LogExpert, logview4j.

It is released weeks ago, and I guess still builds its way up on google.

Solution 9 - Java

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.

Solution 10 - Java

I'll add that for Windows, WireShark makes for a handy syslog viewer, ironically enough. I've tried several other syslog tools, and really, Kiwi is the best for syslog out there, but the "free" version is a bit nerfed. Others I ran into were either poorly programmed (crashing on minor issues -- logview4net), had a poor interface (Star SysLog Daemon Lite), or didn't even run (nxlog)

You can use WireShark's filter language to drill down on log data. It's overkill, but until someone writes a free syslog viewer/collector for Windows and makes it decent, this is one field that will be a hard one for most people.

Example:

# Display level 6 alerts from 192.168.5.90 in WireShark
syslog.level == 6 && ip.addr == 192.168.5.90

Solution 11 - Java

LogMX is a crossplatform tool that parses any log format from any source, then displays log entries with many features. By default, it handles formats like Log4j, LogFactor, syslog,... and can read from local file or SFTP, FTP, HTTP... but you can write your own pluggins if your format is another one or if your logs cannot be accessed through classical protocols.

You can monitor logs in realtime like 'tail' or load a whole log file and stop monitoring it.

www.logmx.com

Solution 12 - Java

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?

Solution 13 - Java

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.

Solution 14 - Java

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!!

Solution 15 - Java

You can use MindTree Insight, it is open source, efficient, and specific for that use case : analyze log4j files.

Solution 16 - Java

I have written a custom tool for that: https://plus.google.com/u/0/102275357970232913798/posts/Fsu6qftH2ja >>Alfa is a GUI tool for analyzing log files. Usually you are forced to search for data in them using editors. You open a log, press Ctrl-F and the "Next" button again and again, then reload the file as it was modified, and repeat the search. Alfa maps a log file to a database allowing you to use standard SQL queries to get data without any superfluous actions.

UPD: Google killed Google+ so please use other link: https://drive.google.com/drive/folders/0B-hYEtveqA0aN1E3Ul9NVlFlYWM

Solution 17 - Java

Another good log viewer is Lilith (http://sourceforge.net/projects/lilith/ and http://lilithapp.com/). It is open source and works well with Logback, log4j & java.util.logging.

Solution 18 - Java

Just published a node module for color highlighting log output log-color-highlight.

echo "this string" | lch -red.bold this -blue string

Works well on unix/linux/windows and supports config file for complex logging scenarios.

For windows I use it in combination with file-tail

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionNadavView Question on Stackoverflow
Solution 1 - JavaNadavView Answer on Stackoverflow
Solution 2 - JavaKrzyHView Answer on Stackoverflow
Solution 3 - JavaJoe SkoraView Answer on Stackoverflow
Solution 4 - JavammdemirbasView Answer on Stackoverflow
Solution 5 - JavaDimaView Answer on Stackoverflow
Solution 6 - JavaRoman IvanovView Answer on Stackoverflow
Solution 7 - Javauser20282View Answer on Stackoverflow
Solution 8 - JavavstraleView Answer on Stackoverflow
Solution 9 - JavaJerry BView Answer on Stackoverflow
Solution 10 - JavaKumbaView Answer on Stackoverflow
Solution 11 - JavaxavView Answer on Stackoverflow
Solution 12 - JavaJohn MeagherView Answer on Stackoverflow
Solution 13 - JavaWill SargentView Answer on Stackoverflow
Solution 14 - JavaGiarosView Answer on Stackoverflow
Solution 15 - JavaAnthony O.View Answer on Stackoverflow
Solution 16 - JavaDzmitry KrakadzeyauView Answer on Stackoverflow
Solution 17 - JavakmccoyView Answer on Stackoverflow
Solution 18 - JavagliviuView Answer on Stackoverflow