You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by ma...@tiscali.it on 2005/08/10 11:19:42 UTC

Logging?

Hi, I think a very simple question: how to log in Log4J with iBatis 2.1.5?

I'm using IBM Rational Software Development Platform Version: 6.0.0.1 and
iBatis 2.1.5 and I've configured log4j.properties file this way:

----------------------------------------------------------------------------------------------------------
# Global logging configuration
log4j.rootLogger=DEBUG, stdout

# for ibatis
# SqlMap logging configuration...
log4j.logger.com.ibatis=DEBUG,stdout
log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG,stdout
log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG,stdout
log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG,stdout
log4j.logger.java.sql.Connection=DEBUG,stdout
log4j.logger.java.sql.Statement=DEBUG,stdout
log4j.logger.java.sql.PreparedStatement=DEBUG,stdout
log4j.logger.java.sql.ResultSet=DEBUG,stdout

# Console output
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%p [%d] [%t] [%c{1}] [%F:%L]
- %m%n

---------------------------------------------------------------------------------------------------------

the problem is that the console does not show anything but exceptions (explicitly
logged in the java code).

I'm I missing something in Log4j or iBatis configuration?

Thanks for you help.

Max

__________________________________________________________________
TISCALI ADSL 1.25 MEGA
Solo con Tiscali Adsl navighi senza limiti e telefoni senza canone Telecom
a partire da 19,95 Euro/mese.
Attivala entro il 31 agosto, il primo MESE รจ GRATIS! CLICCA QUI.
http://abbonati.tiscali.it/adsl/sa/1e25flat_tc/




Re: Logging?

Posted by Eugeny N Dzhurinsky <eu...@jdevelop.com>.
On Wed, Aug 10, 2005 at 11:19:42AM +0200, max_lazzari@tiscali.it wrote:
> Hi, I think a very simple question: how to log in Log4J with iBatis 2.1.5?
> 
> I'm using IBM Rational Software Development Platform Version: 6.0.0.1 and
> iBatis 2.1.5 and I've configured log4j.properties file this way:

you need to add the commons-logging JARs to the classpath to enable logging,
together with the log4J jars

-- 
Eugene N Dzhurinsky