1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.ibatis.logging.log4j;
17
18 import org.apache.ibatis.logging.Log;
19 import org.apache.log4j.Level;
20 import org.apache.log4j.Logger;
21
22
23
24
25
26 @Deprecated
27 public class Log4jImpl implements Log {
28
29 private static final String FQCN = Log4jImpl.class.getName();
30
31 private final Logger log;
32
33 public Log4jImpl(String clazz) {
34 log = Logger.getLogger(clazz);
35 }
36
37 @Override
38 public boolean isDebugEnabled() {
39 return log.isDebugEnabled();
40 }
41
42 @Override
43 public boolean isTraceEnabled() {
44 return log.isTraceEnabled();
45 }
46
47 @Override
48 public void error(String s, Throwable e) {
49 log.log(FQCN, Level.ERROR, s, e);
50 }
51
52 @Override
53 public void error(String s) {
54 log.log(FQCN, Level.ERROR, s, null);
55 }
56
57 @Override
58 public void debug(String s) {
59 log.log(FQCN, Level.DEBUG, s, null);
60 }
61
62 @Override
63 public void trace(String s) {
64 log.log(FQCN, Level.TRACE, s, null);
65 }
66
67 @Override
68 public void warn(String s) {
69 log.log(FQCN, Level.WARN, s, null);
70 }
71
72 }