Coverage Summary for Class: Log4j2Logger (net.sf.persism.logging)

Class Class, % Method, % Line, %
Log4j2Logger 100% (1/1) 100% (10/10) 83.3% (10/12)


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