On 8/18/2012 Oliver Zemann wrote:
> So my question is: is there a simple tutorial or example how logging in 
apache felix works with pax logging (i guess this is the "most" advanced 
as they provide all kind of logging backend APIs) or another simple 
logging facility which will "just" run out of the box and easy 
configurable.

Ekke has a useful series of blogs about logging choices in OSGi 
environments...

http://ekkescorner.wordpress.com/blog-series/osgi-apps/ 

Knopflerfish (another OSGi container) Example

The latest slf4j and log4j jars are OSGi bundles.  We're currently using 
sl4fj with log4j backend in the Knopflerfish OSGi container like this...

-istart file:log4j-1.2.17.jar
-install file:slf4j-log4j12-1.6.6.jar
-istart file:slf4j-api-1.6.6.jar

(note that slf4j-log4j12 is a fragment, so the bundle only gets installed 
but not started).

We configure it with an old fashioned JVM system property 

-Dlog4j.configuration=file:/c:/program files/some-product/log4j.properties

Brian

Reply via email to