Ibatis log4j logging

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Ibatis log4j logging

old_as_a_fossil
I have the log4j.properties in %TOMCAT_HOME%/common/classes/properties whose contents I paste below. It is supposed to write to the file logs/sendDemoApp.log but it never does. Another web application that uses the same log4j.properties does write to this log file. Why is Ibatis not logging?

 ##################################################################################
 ## GLOBAL LOGGING CONFIGURATION (SYNTAX :: LEVEL, APPENDERS) LEVEL::DEBUG < INFO < WARN < ERROR < FATAL.
 ##################################################################################
log4j.rootLogger=DEBUG, dmlog
log4j.logger.com.arcot=WARN
log4j.logger.com.arcot.send.demo=INFO
log4j.logger.com.ibatis=WARN
log4j.logger.java.sql=WARN
log4j.logger.org.apache=WARN

# SqlMap logging configuration...
log4j.logger.com.ibatis=DEBUG, dmlog
log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG, dmlog
log4j.logger.com.ibatis.sqlmap.engine.cache.CacheModel=DEBUG, dmlog
log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientImpl=DEBUG, dmlog
log4j.logger.com.ibatis.sqlmap.engine.builder.xml.SqlMapParser=DEBUG, dmlog
log4j.logger.com.ibatis.common.util.StopWatch=DEBUG, dmlog
log4j.logger.java.sql.Connection=DEBUG, dmlog
log4j.logger.java.sql.Statement=DEBUG, dmlog
log4j.logger.java.sql.PreparedStatement=DEBUG, dmlog
log4j.logger.java.sql.ResultSet=DEBUG, dmlog


##################################################################################
## CONSOLE <stdout> OUTPUT CONFIGURATION
##################################################################################
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
#log4j.appender.stdout.layout.conversionPattern=[%p,%c{1},%t] %m%n
log4j.appender.stdout.layout.conversionPattern=%d [%t] %-5p %c{1},(%t:%L) - %m%n

##################################################################################
##ROLLING LOG FILE 2 <dmlog> OUTPUT
##################################################################################
log4j.appender.dmlog=org.apache.log4j.RollingFileAppender
log4j.appender.dmlog.File=logs/sendDemoApp.log
log4j.appender.dmlog.MaxFileSize=1000MB
log4j.appender.dmlog.MaxBackupIndex=10
log4j.appender.dmlog.layout=org.apache.log4j.PatternLayout
log4j.appender.dmlog.layout.conversionPattern=%d : [%t] : %-5p : %-5c{3} : %m%n
##################################################################################
Reply | Threaded
Open this post in threaded view
|

Re: Ibatis log4j logging

Simone Tripodi
try to move the log4j.properties to %TOMCAT_HOME%/common/classes and
not to %TOMCAT_HOME%/common/classes/properties
Simo

http://people.apache.org/~simonetripodi/
http://www.99soft.org/



On Tue, Sep 7, 2010 at 4:31 PM, old_as_a_fossil
<[hidden email]> wrote:

>
> I have the log4j.properties in %TOMCAT_HOME%/common/classes/properties whose
> contents I paste below. It is supposed to write to the file
> logs/sendDemoApp.log but it never does. Another web application that uses
> the same log4j.properties does write to this log file. Why is Ibatis not
> logging?
>
>
> ##################################################################################
>  ## GLOBAL LOGGING CONFIGURATION (SYNTAX :: LEVEL, APPENDERS) LEVEL::DEBUG <
> INFO < WARN < ERROR < FATAL.
>
> ##################################################################################
> log4j.rootLogger=DEBUG, dmlog
> log4j.logger.com.arcot=WARN
> log4j.logger.com.arcot.send.demo=INFO
> log4j.logger.com.ibatis=WARN
> log4j.logger.java.sql=WARN
> log4j.logger.org.apache=WARN
>
> # SqlMap logging configuration...
> log4j.logger.com.ibatis=DEBUG, dmlog
> log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG, dmlog
> log4j.logger.com.ibatis.sqlmap.engine.cache.CacheModel=DEBUG, dmlog
> log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientImpl=DEBUG, dmlog
> log4j.logger.com.ibatis.sqlmap.engine.builder.xml.SqlMapParser=DEBUG, dmlog
> log4j.logger.com.ibatis.common.util.StopWatch=DEBUG, dmlog
> log4j.logger.java.sql.Connection=DEBUG, dmlog
> log4j.logger.java.sql.Statement=DEBUG, dmlog
> log4j.logger.java.sql.PreparedStatement=DEBUG, dmlog
> log4j.logger.java.sql.ResultSet=DEBUG, dmlog
>
>
> ##################################################################################
> ## CONSOLE <stdout> OUTPUT CONFIGURATION
> ##################################################################################
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> #log4j.appender.stdout.layout.conversionPattern=[%p,%c{1},%t] %m%n
> log4j.appender.stdout.layout.conversionPattern=%d [%t] %-5p %c{1},(%t:%L) -
> %m%n
>
> ##################################################################################
> ##ROLLING LOG FILE 2 <dmlog> OUTPUT
> ##################################################################################
> log4j.appender.dmlog=org.apache.log4j.RollingFileAppender
> log4j.appender.dmlog.File=logs/sendDemoApp.log
> log4j.appender.dmlog.MaxFileSize=1000MB
> log4j.appender.dmlog.MaxBackupIndex=10
> log4j.appender.dmlog.layout=org.apache.log4j.PatternLayout
> log4j.appender.dmlog.layout.conversionPattern=%d : [%t] : %-5p : %-5c{3} :
> %m%n
> ##################################################################################
>
> --
> View this message in context: http://mybatis-user.963551.n3.nabble.com/Ibatis-log4j-logging-tp1433114p1433114.html
> Sent from the mybatis-user mailing list archive at Nabble.com.
>