ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carfield Yim" <carfi...@gmail.com>
Subject How to make ibatis work with java.util.logger?
Date Sun, 24 Dec 2006 11:30:01 GMT
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(consoleHandler);
            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