logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DonLuigi <ludv...@gmail.com>
Subject log4j under osgi not considering config setting
Date Wed, 03 Aug 2011 13:33:27 GMT


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

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.

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

View raw message