I've added log4j
Logger into Spring xml configuration to use it later as a component:
<bean id="logger" class="org.apache.log4j.Logger" factory-method="getLogger">
<constructor-arg type="java.lang.String" value="LoggerName"/>
</bean>
seems everything works fine, but logs are don't point to the target classes where they're have been autowired:
2016-06-30 09:54:23 DEBUG LoggerName:29 - Account does not exists
How to setup the Logger bean properly to let it determine the target class names like this:
2016-06-30 09:54:23 DEBUG AccountValidator:29 - Account does not exists
where AccountValidator
is actual class that the Logger has been autowired into?