I'm not familiar with programmatic configuration using DocumentBuilderFactory...presumably you were having issues that made simple configuration by putting log4j.xml in the classpath not possible? Why are you doing that?
Regarding the configuration file:
1. Definitely turn debug on.
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/' debug="true">
I prefer to set this on the command line with -Dlog4j.debug
2. Get rid of this redundant piece. The <root> element configures the root logger, it doesn't accept any attributes as the additivity flag does not apply to the root logger, cannot have a name; info from
Complete log4j manual (commercial - $ ).
<category name="root" additivity="false"></category>
3. put the additivity flag on the logger you don't want to be included up the hierarchy (loader_debug is the logger you don't want included up the hierarchy; root is up the hierarchy in this case). category/logger is probably not the problem, but logger is preferable.