Logfeeder is a utility for viewing logs generated by the Java logging API. It accepts logs, via a socket, in the XML format defined in java.util.logging. It parses these logs and displays them in a simple Swing-based user interface. While Logfeeder is useful, it is not yet a comprehensive tool for processing logs. I'll continue to improve it based on user feedback.
The Logfeeder installation is basic and straightforward. Start by downloading the logfeeder zip file. This file has a Puzzlecode/Logfeeder directory that contains the primary logfeeder.jar file and associated libraries. Choose an appropriate location for the Puzzlecode directory and extract the zip file in the parent directory. On the Windows platform we recommend unzipping in C:\Program Files.
Configuring Java Logging
Using Logfeeder requires some basic configuration of the Java logging API. If you're using Java logging today you should be familiar with updating logging.properties. This file is contained in the lib directory of the Java runtime. Note that if you've installed the JDK as well as the runtime you will have two runtimes and therefore, two logging.properties files. You'll probably want to modify both.
Find the line in logging.properties that starts with "handlers=". Add the java.util.logging.SocketHandler class to the end of this line as shown in Listing 1. This configures Java logging to send logs to a socket in the default XML format.
handlers= java.util.logging.ConsoleHandler java.util.logging.SocketHandler
After you've added the SocketHandler to the list of handlers you need to configure it. The only required properties are shown in Listing 1. Add the name of the host you'd like to publish logs to as well as the port. Logfeeder is hardwired to accept log data on port 4446. Note that you don't need to configure a formatter for this handler. The Java logging XML format is the default for SocketHandler and Logfeeder only parses this format.
Running Logfeeder is just like running any other jarred Java application. Simply double click on the jar and it starts. Once it starts you can run other Java applications that contain logging. If your logging.properties file is configured correctly you'll see logs appearing in the table in the left half of the Logfeeder display. You can adjust the log data that is displayed in the table by selecting columns under the Display menu. Check a column to show it, uncheck a column to hide it.
Logfeeder is a simple tool for viewing logs. I hope you find it useful. Feel free to send me feedback and I'll incorporate your suggestions.