log4jjacorb

JacOrb and Log4j


I am using Jacorb 3.0 and I want to use log4j as the logging backend. To do so, I have placed the various jar from jacorb, slf4j-api-1.6.6.jar, slf4j-log4j12-1.6.6.jar, log4j-1.2.16.jar and removed the slf4j-jdk14-1.6.4.jar in the classpath. So far so good.

However, Jacorb prints out too much log that I don't care about, and I can't manage to exclude it. In my log4j.properties I have tried something like:

log4j.category.org.jacorb.orb=WARN
log4j.additivity.org.jacorb.orb=false

but I still see lines like

14:27:48.974|INFO |org.jacorb.orb.ORB                   |main           |ORB run

in my log. How can I exclude everything that isn't a WARN or above from my log?


Solution

  • I have found a solution by looking at this question: I switched the root logger to log only WARN and above, and then explicitly enabled log at DEBUG level for my own package, like this:

    log4j.rootLogger=WARN,CONSOLE
    log4j.category.my.package=DEBUG