I have changed my code from Log4J logging to SLF4J and I now my log files are no longer written to disk for my web service, I can see all of the logging in the tomcat console. I copied the following slf4j jars to my apache-tomcat-6.0.20\webapps\axis2\WEB-INF\lib folder and I renamed the existing slf4j-api-1.5.2.jar.org and slf4j-jdk14-1.5.2.jar.org. Inside the apache-tomcat-6.0.20\webapps\axis2\WEB-INF\classes folder the commons-logging.properties has the following:
# Uncomment the next line to disable all logging. #org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog # Uncomment the next line to enable the simple log based logging #org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLo g # Uncomment the next line to enable log4j based logging org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogg er Also, the log4j.properties has: # Set root category priority to INFO and its only appender to CONSOLE. log4j.rootCategory=INFO, CONSOLE #log4j.rootCategory=INFO, CONSOLE, LOGFILE log4j.category.com.myservice=TRACE, MyWebService # Set the enterprise logger priority to FATAL log4j.logger.org.apache.axis2.enterprise=FATAL log4j.logger.de.hunsicker.jalopy.io=FATAL log4j.logger.httpclient.wire.header=FATAL log4j.logger.org.apache.commons.httpclient=FATAL # CONSOLE is set to be a ConsoleAppender using a PatternLayout. log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=[%p] %m%n # LOGFILE is set to be a File appender using a PatternLayout. log4j.appender.LOGFILE=org.apache.log4j.FileAppender log4j.appender.LOGFILE.File=axis2.log log4j.appender.LOGFILE.Append=true log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n # My Web Service Appender log4j.appender.MyWebService=org.apache.log4j.RollingFileAppender log4j.appender.file.maxFileSize=100KB log4j.appender.file.maxBackupIndex=5 log4j.appender.MyWebService.File=../../logs/MyWebService.log log4j.appender.MyWebService.layout=org.apache.log4j.PatternLayout log4j.appender.MyWebService.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n Does SLF4J ignore the logging properties file? How do I get a log file written to disk with SLF4J?
_______________________________________________ user mailing list user@slf4j.org http://www.slf4j.org/mailman/listinfo/user