Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 83597 invoked from network); 9 Feb 2009 00:30:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Feb 2009 00:30:21 -0000 Received: (qmail 14843 invoked by uid 500); 9 Feb 2009 00:30:14 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 14827 invoked by uid 500); 9 Feb 2009 00:30:14 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 14818 invoked by uid 99); 9 Feb 2009 00:30:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Feb 2009 16:30:14 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [63.249.95.37] (HELO mail.cruzio.com) (63.249.95.37) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Feb 2009 00:30:06 +0000 Received: from [192.168.0.103] (dsl-63-249-101-4.cruzio.com [63.249.101.4]) by mail.cruzio.com with ESMTP id n190TjS2064707 for ; Sun, 8 Feb 2009 16:29:45 -0800 (PST) Message-ID: <498F78F9.1010108@cruzio.com> Date: Sun, 08 Feb 2009 16:29:45 -0800 From: Richard Yee User-Agent: Thunderbird 1.4 (Windows/20050908) MIME-Version: 1.0 To: user-java@ibatis.apache.org Subject: Re: logging not working using log4j References: <4183A3E77BDF204180B74CE77F50B0BF09BB1659@ITDENE2KM05.AD.QINTRA.COM> <498C4EB7.7040306@cruzio.com> <4183A3E77BDF204180B74CE77F50B0BF09BB1661@ITDENE2KM05.AD.QINTRA.COM> <2DEE3780-8353-4EAB-B4E5-AD9CAF4E6CC7@cruzio.com> <4183A3E77BDF204180B74CE77F50B0BF09BB1664@ITDENE2KM05.AD.QINTRA.COM> In-Reply-To: <4183A3E77BDF204180B74CE77F50B0BF09BB1664@ITDENE2KM05.AD.QINTRA.COM> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Eric, Did you at least see more logging messages? If not, this indicates that the log4j.properties file that you are editing is not in the classpath and is not getting read by the application. I'd suggest putting it in the WEB-INF/classes directory of your webapp. Otherwise, you can put it in one of the library directories of your application server. However, doing this, will set the logging level for all applications in the container. -Richard Stanley, Eric wrote: > Richard, > I have set it to DEBUG, still nothing. > > -Ryan > > -----Original Message----- > From: Richard Yee [mailto:ryee@cruzio.com] > Sent: Saturday, February 07, 2009 12:14 AM > To: user-java@ibatis.apache.org > Subject: Re: logging not working using log4j > > Set the rootlog level to debug. You might have more than one log4j file > in your classpath. > > -r > > Sent from my iPhone > > On Feb 6, 2009, at 1:25 PM, "Stanley, Eric" > wrote: > > >> Richard, >> I know its being read. As I mentioned below, all other components >> of the app are using it just fine. My app, struts2 and tomcat are both >> > > >> using it without a problem. The only thing that's not logging is >> iBATIS. >> >> -Ryan >> >> -----Original Message----- >> From: Richard Yee [mailto:ryee@cruzio.com] >> Sent: Friday, February 06, 2009 7:53 AM >> To: user-java@ibatis.apache.org >> Subject: Re: logging not working using log4j >> >> Where did you put your log4j.properties file? It needs to be in the >> classpath. >> Do you get any indication that it is being read at all? >> -R >> Stanley, Eric wrote: >> >>> Hello, >>> I have a Tomcat 6 container, and my java 1.5 app is using iBATIS >>> 2.3.4 and struts2. This is my log4.properties: >>> >>> >>> # Set root logger >>> >>> log4j.rootLogger=INFO, R, A1 >>> >>> # A1 is set to be a ConsoleAppender. >>> >>> log4j.appender.A1=org.apache.log4j.ConsoleAppender >>> >>> log4j.appender.A1.layout=org.apache.log4j.PatternLayout >>> >>> log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %C %x - %m >>> %n >>> >>> # R is a file appender >>> >>> log4j.appender.R=org.apache.log4j.RollingFileAppender >>> >>> log4j.appender.R.File=log/pt.log >>> >>> log4j.appender.R.MaxFileSize=1MB >>> >>> log4j.appender.R.MaxBackupIndex=5 >>> >>> log4j.appender.R.layout=org.apache.log4j.PatternLayout >>> >>> log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %C %x - %m%n >>> >>> # SqlMap logging configuration... >>> >>> log4j.logger.com.ibatis=DEBUG >>> >>> log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG >>> >>> log4j.logger.com.ibatis.sqlmap.engine.cache.CacheModel=DEBUG >>> >>> log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientImpl=DEBUG >>> >>> log4j.logger.com.ibatis.sqlmap.engine.builder.xml.SqlMapParser=DEBUG >>> >>> log4j.logger.com.ibatis.common.util.StopWatch=DEBUG >>> >>> log4j.logger.java.sql.Connection=DEBUG >>> >>> log4j.logger.java.sql.Statement=DEBUG >>> >>> log4j.logger.java.sql.PreparedStatement=DEBUG >>> >>> log4j.logger.java.sql.ResultSet=DEBUG >>> >>> >>> >>> If I understand correctly, this should spit out debug for everything >>> iBATIS logs, right? Problem is, I dont get any logging for iBATIS, >>> but >>> >>> I do for my app, tomcat, and struts2. What am I missing here? >>> >>> >>> >>> -Ryan >>> >>> >>> >>> This communication is the property of Qwest and may contain >>> confidential or privileged information. Unauthorized use of this >>> communication is strictly prohibited and may be unlawful. If you have >>> > > >>> received this communication in error, please immediately notify the >>> sender by reply e-mail and destroy all copies of the communication >>> and >>> >>> any attachments. >>> > >