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
27 @Deprecated
28 public class Log4jImpl implements Log {
29
30 private static final String FQCN = Log4jImpl.class.getName();
31
32 private final Logger log;
33
34 public Log4jImpl(String clazz) {
35 log = Logger.getLogger(clazz);
36 }
37
38 @Override
39 public boolean isDebugEnabled() {
40 return log.isDebugEnabled();
41 }
42
43 @Override
44 public boolean isTraceEnabled() {
45 return log.isTraceEnabled();
46 }
47
48 @Override
49 public void error(String s, Throwable e) {
50 log.log(FQCN, Level.ERROR, s, e);
51 }
52
53 @Override
54 public void error(String s) {
55 log.log(FQCN, Level.ERROR, s, null);
56 }
57
58 @Override
59 public void debug(String s) {
60 log.log(FQCN, Level.DEBUG, s, null);
61 }
62
63 @Override
64 public void trace(String s) {
65 log.log(FQCN, Level.TRACE, s, null);
66 }
67
68 @Override
69 public void warn(String s) {
70 log.log(FQCN, Level.WARN, s, null);
71 }
72
73 }