Results 1 to 2 of 2

Thread: Howto add debug logging to the beanfactory

  1. #1

    Default Howto add debug logging to the beanfactory

    I have a problem with 2 beans with the same name being declared.

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'eventsContainer' defined in class path resource [uk/co/bigsoft/proj/dino/bus/event/dinoEvents.xml]: Invocation of init method failed; nested exception is org.springframework.oxm.jibx.JibxSystemException: Multiple bindings defined for class uk.co.bigsoft.sm.event.EventsContainer; nested exception is org.jibx.runtime.JiBXException: Multiple bindings defined for class com.quantel.sm.event.EventsContainer

    I would like to switch on debug logging in the bean factory. Can anyone help with this?

    What file do I need to create?
    Where do I need to put it?
    and What do I put in it?

    There doesn't seem to be much help in the reference manual.

  2. #2
    Join Date
    May 2007
    Location
    Saint Petersburg, Russian Federation
    Posts
    1,189

    Default

    Put the following file named log4j.xml at classpath and make sure you have log4j binaries at classpath as well:

    HTML Code:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    
    <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
    	<appender name="console" class="org.apache.log4j.ConsoleAppender">
    		<param name="Target" value="System.out"/>
    		<layout class="org.apache.log4j.PatternLayout">
    			<param name="ConversionPattern" value="%-5p %c{1} - %m%n"/>
    		</layout>
    	</appender>
    
    	<root>
    		<priority value="debug"/>
    		<appender-ref ref="console"/>
    	</root>
    
    </log4j:configuration>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •