Welcome to the new Spring.io forums!
If this is your first visit, be sure to check out the
by clicking the link above, and for security reasons, use the
forgot password link to reset your password..
You may have to register before you can post: click the register
link above to proceed. To start viewing messages, select the forum that you want to visit
from the selection below.
Spring uses Jakarta Commons Logging. The later uses log4j if it is found in your classpath.
Since you use JDK1.4, just remove log4j.jar from your classpath, and JCL will use JDK logging.
For more information take a look at http://jakarta.apache.org/commons/lo...#Configuration
I auto-generate my class path to add all jar files within a directory to my class path and I'd rather keep my log4j.jar file there. I think one can set a property to specify which kind of logging to use with this system property:
as specified in http://java.sun.com/j2se/1.4.2/docs/...LogManager.htm
How would I set up this System property file in the Spring applicationContext.xml file?
You can't set the system property from Spring itself, since it will be too late. (Thsi is assuming the appserver security environment even let's you set system properties). Spring will have already tried to log something, so log4j will have been initialized.
If you can not modify your appserver environment to just start up the appserver with this property already set, what you could try doing is setting the system property in a web app context loader listener which is registered to be the first one loaded, when your webapp loads.