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