Java Mailing List Archive

http://www.java2.5341.com/

Home » Log4J Users List »

log4j under osgi not considering config setting

DonLuigi

2011-08-03


Author LoginPost Reply

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
--
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@(protected)
For additional commands, e-mail: log4j-user-help@(protected)

©2008 java2.5341.com - Jax Systems, LLC, U.S.A.