Jun 10 2009
Backup FTP OVH
Excellent tutoriel proposé par DanSteph à http://www.dansteph.com/backupftp.php
Merci à lui.
Jun 10 2009
Excellent tutoriel proposé par DanSteph à http://www.dansteph.com/backupftp.php
Merci à lui.
Jun 04 2009
![]()
Spring uses Apache commons-logging as a bridge between different logging implementations.
This way you can change from a logging framework to any other supported loggin mechanism at any time.
The org.springframework.beans.factory.config.CommonsLogFactoryBean will create a "logger bean" and his type will depends on your configuration.
Example for the Log4j implementation:
In your application context, add a CommonsLogFactoryBean and give it a logName.
In your web.xml, add the org.springframework.web.util.Log4jConfigListener listener before the
org.springframework.web.context.ContextLoaderListener
Here, my log4j config is locatedin the WEB-INF/log4j.properties and here is its content:
To make use of your logger in your other beans, add a member variable of type org.apache.commons.logging.Log
and configure Spring to inject the reference to the logger bean. For my part, I choose to do it through annotations because I don't want to have to make this reference in all my beans...
So, in your application context, add the
tag to enable the annotations config.In the targets beans, annotate the member variable as follow: