This is the part I find really weird. If I remove the ibatis specific stuff from the log4j properties file we get no ibatis logging info. So my grasp of log4j isn¹t as good as I had hoped. The problem is I¹d still like to get the ERROR and WARN logs from ibatis.
Z. > > I¹m deploying an ibatis based on onto to Tomcat (6.0.13) for the first time. > > Everything has been great and while I had set the log level to debug logging > was working as should. But now I can¹t get log4J to only log error events. My > log4j.properties file is listed below. As you can see it shouldn¹t be logging > debug events, but I am. I¹ve attached a sample from my log file. > > Is there something that I need to change in tomcat, I read the Tomcat 6 docs > and there was nothing obvious. Any help would be really appreciated. > > # Global logging configuration > log4j.rootLogger=ERROR, stdout, fileout > > # SpareCreative SMS logging config > log4j.logger.com.sparecreative.sms=ERROR, stdout, fileout > > # SqlMap logging configuration... > log4j.logger.com.ibatis=ERROR > log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=ERROR > log4j.logger.com.ibatis.common.jdbc.ScriptRunner=ERROR > log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=ERROR > log4j.logger.java.sql.Connection=ERROR > log4j.logger.java.sql.Statement=ERROR > log4j.logger.java.sql.PreparedStatement=ERROR > log4j.logger.java.sql.ResultSet=ERROR > > log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=ERR > OR, stdout > log4j.logger.org.apache.catalina.core=ERROR, stdout > log4j.logger.org.apache.catalina.session=ERROR, stdout > > # Console output... > log4j.appender.stdout=org.apache.log4j.ConsoleAppender > log4j.appender.stdout.layout=org.apache.log4j.PatternLayout > log4j.appender.stdout.layout.ConversionPattern= %d{dd/MM/yyyy HH:mm:ss} %5p > [%t] - %m%n > > log4j.appender.fileout=org.apache.log4j.RollingFileAppender > log4j.appender.fileout.File=/usr/local/tomcat/logs/SMS-debug.log > log4j.appender.fileout.MaxFileSize=100KB > log4j.appender.fileout.MaxBackupIndex=1 > log4j.appender.fileout.layout=org.apache.log4j.PatternLayout > log4j.appender.fileout.layout.ConversionPattern= %d{dd/MM/yyyy HH:mm:ss} %5p > [%t] - %m%n > > > Sample log file: > > 31/03/2008 12:05:30 DEBUG [http-8080-7] - {pstm-100021} Executing Statement: > SELECT A.action_id, A.action_name, A.class_name, A.description, A.help_id, > A.action_icon, A.action_link, A.weight, A.action_type, > A.parent_action, R.role_id, R.role_description, R.role_name FROM > Actions as A LEFT OUTER JOIN ( Action_roles as AR > JOIN Roles as R on R.role_id = AR.role_id) on A.action_id > = AR.action_id WHERE A.parent_action = ? AND > action_type = 1 ORDER BY A.weight ASC > 31/03/2008 12:05:30 DEBUG [http-8080-7] - {pstm-100021} Parameters: [8] > 31/03/2008 12:05:30 DEBUG [http-8080-7] - {pstm-100021} Types: > [java.lang.Integer] > 31/03/2008 12:05:30 DEBUG [http-8080-7] - {rset-100022} ResultSet > 31/03/2008 12:05:30 DEBUG [http-8080-7] - {rset-100022} Header: [action_id, > action_name, class_name, description, help_id, action_icon, action_link, > weight, parent_action, action_type, role_id, role_name, role_description] > 31/03/2008 12:05:30 DEBUG [http-8080-7] - {rset-100022} Result: [58, List > Clients, com.sparecreative.mms.action.ClientAction, Get a list of clients, 0, > null, /manage/getClient.action, 1, 8, 1, -1, All users, This role is required > for key system functionality. Only use this role with Actions.] > 31/03/2008 12:05:30 DEBUG [http-8080-7] - {conn-100023} Connection >