I'm setting two beans in the beans.xml
file to inject loggers into my classes.
<bean id="loggerFactory" class="company.LoggerFactory" />
<bean id="logger" class="org.apache.log4j.Logger" factory-bean="loggerFactory" factory-method="createLogger" />
The setting causes the LoggerFactory.createLogger
method to be called and this is working correctly.
What I want to know is: how within this method, do I get the class where the object will be injected to put it as the logger name?