KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ibatis > common > logging > jdk14 > Jdk14LoggingImpl


1 package com.ibatis.common.logging.jdk14;
2
3 import java.util.logging.Logger JavaDoc;
4 import java.util.logging.Level JavaDoc;
5
6 public class Jdk14LoggingImpl implements com.ibatis.common.logging.Log {
7
8     private Logger JavaDoc log;
9
10     public Jdk14LoggingImpl(Class JavaDoc 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 JavaDoc s, Exception JavaDoc e) {
19       log.log(Level.SEVERE, s, e);
20     }
21
22     public void debug(String JavaDoc s) {
23       log.log(Level.FINE, s);
24     }
25
26     public void warn(String JavaDoc s) {
27       log.log(Level.WARNING, s);
28     }
29
30
31   }
32
Popular Tags