After upgrading our systems from 4.0 to 4.1 I am having a tough time figuring out how to configure log4j. Our old system had a log4j.properties file in a custom spot that we had ActiveMQ pull in with "--extdir /some/config/dir". This doesn't seem to be working anymore. ActiveMQ can't find the properties file on the classpath when it's not in the standard spot. Any idea on what could be going wrong? You can reproduce this by-- in the binary distribution-- moving conf/log4j.properties to config/log4j.properties, and then play around with the -classpath and --extdir settings. None seem to work.

I dug into the code a bit and saw this new check in the activemq- console class loader:

if( files[j].getName().endsWith(".zip") || files[j].getName().endsWith (".jar") ){
    try{
System.out.println("Adding to classpath: " + files [j].getCanonicalPath()); }catch(Exception e){}
        urls.add(files[j].toURL());
     }
}

When I add ".properties" to the conditional I can see the printout saying the properties file is added, however when I query the class loader later in one of our custom beans running alongside the broker it can't get the "log4j.properties" resource. This problem is probably related.

I should be able to eventually hunt this down, but was hoping someone had a quick answer.

Thanks,

John

Reply via email to