ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stanley, Eric" <Eric.R.Stan...@qwest.com>
Subject RE: logging not working using log4j
Date Fri, 06 Feb 2009 21:25:33 GMT
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.


Mime
View raw message