You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by DonLuigi <lu...@gmail.com> on 2011/08/03 15:33:27 UTC

log4j under osgi not considering config setting

Hello.

I am using Karaf. Since OSGi LogService is very limited I decided to use
already bundled log4j which serves as logService backend as well.

First I configured log level for my bundle in org.ops4j.pax.logging.cfg:
log4j.logger.rts = ALL

I also turned on log4j.debug = true just to be sure that config is reloaded.

After I save config file I get following notification:

log4j: Parsing for [root] with value=[INFO, out].
log4j: Level token is [INFO].
log4j: Category root set to INFO
...
log4j: Parsing for [rts] with value=[ALL].
log4j: Level token is [DEBUG].
log4j: Category rts set to DEBUG
log4j: Handling log4j.additivity.rts=[null]
log4j: Finished configuring.

Then in my bundle I do Logger.getLogger ("rts").fine ("blah") and nothing
happens!

Using debugger shows that rts Logger has level set to INFO and not ALL.  It
seems that log4j is only considering root logger configuration.

Anybody knows what is going on?

P.S. I tried all sorts of combinations.

Thanks
-- 
View this message in context: http://old.nabble.com/log4j-under-osgi-not-considering-config-setting-tp32186316p32186316.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org