Ganymede Revisited - Log4J In Eclipse

Some of you may recall my earlier experiences with Ganymede were less that successful. To recap Ganymede is a plugin for eclipse that receives messages sent from Log4J. My problems revolved around the complete lack of documentation to explain how to get the thing to work. Anyway, Will Sargent was kind enough to point me in the right direction and explain how to get Ganymede working. After remembering to add a Socket Appender for my program it worked a treat. I don’t like it as much as Chainsaw or LogFactor5 (both of which are standalone Swing applications) in terms of functionality, however Ganymede is much more convenient that either of them as it sits right in my IDE.

If it added some more flexible filters (I cannot for example say only show INFO messages and above for a given category), allowed me to change the background of the eclipse view, added a tree-based view and a search function then I’d be a happy bunny. Oh, and some documentation of course – although I suppose it wouldn’t take me long to write that myself…

This entry was posted on Friday, September 19th, 2003 at 12:47 pm and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

2 Responses to “Ganymede Revisited - Log4J In Eclipse”

For anyone who’s wondering, the easiest way to use log4j with eclipse after the steps mentioned in the article is to:

BasicConfigurator.configure(new SocketAppender(“localhost”,4445));
Logger logger = Logger.getLogger(MyClass.class);
logger.info(“message”);

However, I do not know how to make the line numbers / method names show up in the Ganymede view. It is easy to get them to show on the Console or in a file however using something like:
PatternLayout(”%5p [%t] (%F:%L) – %m%n”)

If anyone knows what layout pattern Ganymede requires to populate the line # field, please let me know!

thanks,
—reid

And the equivilent XML (works equally well for chainsaw or LogFactor5):

Have your say





Fields in bold are required. Email addresses are never published or distributed.

Some HTML code is allowed:

URIs must be fully qualified (eg: http://www.domainname.com) and all tags must be properly closed.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.