Coverage Summary for Class: Log4jLogger (net.sf.persism.logging)
Class |
Class, %
|
Method, %
|
Line, %
|
Log4jLogger |
100%
(1/1)
|
100%
(10/10)
|
100%
(12/12)
|
1 package net.sf.persism.logging;
2
3 import org.apache.log4j.Logger;
4
5
6 /**
7 * @hidden
8 */
9 public final class Log4jLogger extends AbstractLogger {
10
11 public Log4jLogger(String logName) {
12 super(LogMode.LOG4J, logName);
13 }
14
15 @Override
16 public boolean isDebugEnabled() {
17 return Logger.getLogger(logName).isDebugEnabled();
18 }
19
20 @Override
21 public void debug(Object message, Object... params) {
22 if (isDebugEnabled()) {
23 Logger.getLogger(logName).debug(String.format("" + message, params));
24 }
25 }
26
27 @Override
28 public void debug(Object message) {
29 if (isDebugEnabled()) {
30 Logger.getLogger(logName).debug("" + message);
31 }
32 }
33
34 @Override
35 public void info(Object message) {
36 Logger.getLogger(logName).info(message);
37 }
38
39 @Override
40 public void info(Object message, Throwable t) {
41 Logger.getLogger(logName).info(message, t);
42 }
43
44 @Override
45 public void warn(Object message) {
46 Logger.getLogger(logName).warn(message);
47 }
48
49 @Override
50 public void warn(Object message, Throwable t) {
51 Logger.getLogger(logName).warn(message, t);
52 }
53
54 @Override
55 public void error(Object message) {
56 Logger.getLogger(logName).error(message);
57 }
58
59 @Override
60 public void error(Object message, Throwable t) {
61 Logger.getLogger(logName).error(message, t);
62 }
63 }