ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carfield Yim" <carfi...@gmail.com>
Subject Re: How to make ibatis work with java.util.logger?
Date Tue, 26 Dec 2006 05:15:33 GMT
Sorry, it don't work either

On 12/25/06, Niels Beekman <n.beekman@wis.nl> wrote:
> Use java.sql.PreparedStatement.class.getName() instead of
> java.sql.PreparedStatement.class.toString()?
>
> Niels
>
> -----Original Message-----
> From: Carfield Yim [mailto:carfield@gmail.com]
> Sent: zondag 24 december 2006 17:42
> To: user-java@ibatis.apache.org
> Subject: Re: How to make ibatis work with java.util.logger?
>
> I does that already. And I can verify that because the warning of
> missing log4j.properties is gone.
>
> However, how can I config it?
>
> On 12/24/06, Jeff Butler <jeffgbutler@gmail.com> wrote:
> > By default, iBATIS will not use Java native logging if Log4J or
> commons
> > logging is available in the classpath.  That's probably the issue
> because
> > commons logging is a standard part of so many runtimes.
> >
> > You can force iBATIS to use Java native logging with this method:
> >
> >
> > com.ibatis.common.logging.LogFactory.selectJavaLogging();
> >
> > Call this method before any other iBATIS methods.
> >
> > Jeff Butler
> >
> >
> >
> >
> > On 12/24/06, Carfield Yim <carfield@gmail.com> wrote:
> > > Anyone can show me a very simple config? I don't like to include
> > > log4j.properties just for unit test. I try to log everything to
> > > console with the following code:
> > >
> > >            final ConsoleHandler consoleHandler = new
> ConsoleHandler();
> > >            consoleHandler.setLevel(Level.ALL);
> > >
> > >
> > Logger.getLogger(java.sql.PreparedStatement.class.toString
> > ()).addHandler(consoleHandler);
> > >
> >
> Logger.getLogger(java.sql.Statement.class.toString()).addHandler(console
> Handler);
> > >
> > Logger.getLogger(Class.class.toString()).addHandler(consoleHandler);
> > >            Logger.global.addHandler(consoleHandler);
> > >
> > > But it fail, nothing is logged, just wonder how can I make ibatis
> log
> > > with java logging?
> > >
> >
> >
>
>

Mime
View raw message