views:

47

answers:

1

I have a maven2 plugin that calls hibernate as configured in a Spring context. Hibernate, of course, logs. I'm trying to control the logging.

0 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.2.6

So, I explicitly put slf4j into the plugin's dependencies, along with the log4j package.

And I configure Spring to use log4j, via

 <bean id="log4jInitialization" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean" lazy-init="false">
        <property name="targetClass" value="org.springframework.util.Log4jConfigurer"/>
        <property name="targetMethod" value="initLogging"/>
        <property name="arguments">
            <list>
                <value>${log4j.properties}</value>
            </list>
        </property>
    </bean>

It looks as if hibernate's use of log4j is not picking up the same log4j.properties as I'm configuring here. Can anyone give me a way to line them up?

A: 

Where is that log4j.properties? I think it needs to be on the class path to be picked up by Hibernate.

Pascal Thivent