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

Class Class, % Method, % Line, %
Log4jLogger 0% (0/1) 0% (0/9) 0% (0/10)


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