Ganymede is an Eclipse plug-in that allows log4j messages to be displayed within a view. This view can be used to quickly and easily view and filter logging messages. The plug-in captures the log messages on a socket and displays them in a view that can be docked or hidden in a fast-view.

Eclipse Update Site:

To access the update site for the Ganymede project create an update site for Ganymede and provide it the url: http://ganymede.sf.net/update .

Installation

  1. Expand the plugin underneath your eclipse install
  2. (Re)Start Eclipse
  3. Select Window->Show View and pick Logging->Ganymede Log4j View:
    Image of view selection
  4. The initial view should look like this:
    Image of initial view
  5. Set up your initial column settings by going to Window->Preferences->Ganymede->Columns
    Image of basic column preferences empty
  6. Add columns in the order you would like to see them on your table.  (ie...Level, Category, Line #, Message)
    Image of some defaults in the column preferences
  7. Hit "Ok".  Your view should now look like this:
    Image of the view after column setup/
  8. Your basic setup is complete.  Please see the log4j configuration section for details on how to setup your log4j configuration to send messages to this view.

Log4j Configuration

Ganymede listens on a socket for log4j SocketAppenders.  To use Ganymede you must have your log4j environment set up to append to such a SocketAppender.  Ganymede listens by default on port 4445, so it is easiest to add a socket appender to your log4j configuration to write to 4445, but you may also change the port in the Ganymede preferences if you wish.  Below are examples of appender stanzas.

XML Format

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

<appender name="Ganymede" class="org.apache.log4j.net.SocketAppender">
<param name="remoteHost" value="localhost"/>
<param name="port" value="4445"/>
<param name="locationInfo" value="true"/>
</appender>

<root>
<priority value="debug"/>
<appender-ref ref="Ganymede"/>
</root>

</log4j:configuration>

Properties Format

log4j.rootCategory=DEBUG, Ganymede

log4j.appender.Ganymede=org.apache.log4j.net.SocketAppender
log4j.appender.Ganymede.remoteHost=localhost
log4j.appender.Ganymede.port=4445
log4j.appender.Ganymede.locationInfo=true

Usage

Ganymede is a socket listener, and as such, is not something that can or should run automatically, although there is an outstanding request to have it start automatically.  Currently it must be told to begin listening.  To start and stop the socket listener, use the running man icons or the pull down menu.  Ganymede must be started before it will begin to recieve logs.

Ganymede also has the ability to pull up more detail for a given message.  This is especially useful when there are associated stack traces or long formatted debug messages.  You can pull up a message detail pop-up by double clicking on the pertanent message.  A message detail can look like the following:
Message Detail

Quick Filtering

The easiest, and by far the most powerful, way to use filters is to use the quick filter option.  The quick filter option will investigate all possible message fields for that text string and only show you entries that include that string.  It will even inspect fields which you do not display.  Hitting "Ok" will refresh your table view with the appropriate entries.

Basic Filtering is done simply by double clicking on the text "No Filter" or the three arrows from the view: Image of a view

Which brings up the dialog:
Image of the quick filter dialog

Advanced Filtering

Ganymede includes the ability to set up complex filter rules, although there is no support yet to save these off.  The easiest, and by far the most powerful, way to use filters is to use the quick filter option.

In order to create an advanced filter setup, go into the Ganymede preferences, Filters:
Image of an empty filter preference

You may then add and includes or an excludes case to each possible field in the Log message.  For example:
Image of a sample filter preference

Screenshots

Screen Shot