Logging in OSGI Applications – Monitor Log Messages (Lilith)

I already blogged about “Lilith” – a great tool to monitor log messages from LOGBack (native implementation of SLF4J)

You should read first my blog about Lilith: https://ekkescorner.wordpress.com/2009/09/05/osgi-logging-part-8-viewing-log-events-lilith/ because this is one is only an add-on.

Lilith Version 0.9.37

Since my last blog there’s a new version of Lilith available to download: http://sourceforge.net/projects/lilith/files/ – as usual for OSX, Linux, Windows.

Jörn Huxhorn (Developer of Lilith) did a great job listening to users of Lilith. The Screen space now is much better used and you can Zoom-in and Zoom-out into Log message details.

Because LOGBack now is dual-licensed with EPL, I think more will try out LOGBack with SLF4J and then will find Lilith a great tool to monitor and view log messages.

Lilith and OSGI

To get the full power of Lilith you should use the Lilith ClassicMultiplexSocketAppender as described in my older blog entry.

But if you’re running an OSGI Application then you run into a problem: if you try to use Appenders or Converters not included in logback.classic bundle then logback doesn’t know about this and won’t “understand” your configuration. I described some solutions in another blog here. I also created a JIRA to add Eclipse Buddy Policy: http://jira.qos.ch/browse/LBCLASSIC-179.

For now the easiest way is the use of a Fragment Bundle to add Lilith ClassicMultiplexSocketAppender to LOGBack.

Host-Plug-In: ch.qos.logback.classic

and you need some jar files from Lilith download:

I placed the jars at the root of a Fragment Bundle and specified them at MANIFEST.MF -> Runtime -> Classpath.

Download ClassicMultiplexSocketAppender Fragment

To make this easier you can download this Fragment from here: http://www.assembla.com/spaces/ekkescorner/documents

use it together with slf4j 1.5.10, logback 0.9.18 and lilith 0.9.37

have fun. (more blogs will follow while preparing download of redView)

I’m using SLF4J, LOGBack and Lilith in my redView and open-erp-ware projects and also for openArchitectureWare workflows.

One response

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: