01: package com.ibatis.common.logging.jdk14;
02:
03: import java.util.logging.Logger;
04: import java.util.logging.Level;
05:
06: public class Jdk14LoggingImpl implements com.ibatis.common.logging.Log {
07:
08: private Logger log;
09:
10: public Jdk14LoggingImpl(Class clazz) {
11: log = Logger.getLogger(clazz.toString());
12: }
13:
14: public boolean isDebugEnabled() {
15: return log.isLoggable(Level.FINE);
16: }
17:
18: public void error(String s, Throwable e) {
19: log.log(Level.SEVERE, s, e);
20: }
21:
22: public void error(String s) {
23: log.log(Level.SEVERE, s);
24: }
25:
26: public void debug(String s) {
27: log.log(Level.FINE, s);
28: }
29:
30: public void warn(String s) {
31: log.log(Level.WARNING, s);
32: }
33:
34: }
|