ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Goodin <brandon.goo...@gmail.com>
Subject Re: Log4j question
Date Fri, 18 Feb 2005 03:26:31 GMT
http://wiki.apache.org/ibatis/How_20do_20I_20get_20SqlMapClient_20to_20log_20SQL_20statements_3f


On Mon, 14 Feb 2005 11:19:51 -0500, Matt Givney <mgivney@hotmail.com> wrote:
> 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