ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Givney" <mgiv...@hotmail.com>
Subject Log4j question
Date Mon, 14 Feb 2005 16:19:51 GMT
Hi folks,

Great product, thanks for all your hard work!

Question about logging what the framework is doing when running an app on 
WebSphere. I have written and tested code using a simple datasource and 
running from my main method and I get the War & Peace style logging (love 
it!)

Though when I transfer the same code to a JSP, and switch my datasource from 
SIMPLE to JNDI, I don't get anything. Any ideas what I am doing wrong?

Here's a copy of my log4j properties file:

# Global logging configuration
log4j.rootLogger=DEBUG, stdout

# Console output...
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n

And here's the code from the JSP:

try
{
   SqlMapClient client = SQLMapConfig.getSqlMapInstance();
   List list = client.queryForList("getBrandCodes", null );

   if ( list.size() > 0 )
     System.out.println( "It worked!");

}catch( Exception exception ){
    exception.printStackTrace();
}



Mime
View raw message