Coverage Report - org.jtheque.core.managers.log.JThequeLogger
 
Classes in this File Line Coverage Branch Coverage Complexity
JThequeLogger
0 %
0/17
N/A
1
 
 1  
 package org.jtheque.core.managers.log;
 2  
 
 3  
 /*
 4  
  * This file is part of JTheque.
 5  
  *
 6  
  * JTheque is free software: you can redistribute it and/or modify
 7  
  * it under the terms of the GNU General Public License as published by
 8  
  * the Free Software Foundation, either version 3 of the License.
 9  
  *
 10  
  * JTheque is distributed in the hope that it will be useful,
 11  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13  
  * GNU General Public License for more details.
 14  
  *
 15  
  * You should have received a copy of the GNU General Public License
 16  
  * along with JTheque.  If not, see <http://www.gnu.org/licenses/>.
 17  
  */
 18  
 
 19  
 import org.slf4j.Logger;
 20  
 import org.slf4j.LoggerFactory;
 21  
 
 22  
 /**
 23  
  * A JTheque Logger. This logger is based on a Log4J logger.
 24  
  *
 25  
  * @author Baptiste Wicht
 26  
  */
 27  
 public final class JThequeLogger implements IJThequeLogger {
 28  
     private final Logger logger;
 29  
 
 30  
     /**
 31  
      * Construct a new <code>MyLogger</code>.
 32  
      *
 33  
      * @param callerClass The class who want to obtain a logger.
 34  
      */
 35  
     public JThequeLogger(Class<?> callerClass) {
 36  0
         super();
 37  
 
 38  0
         logger = LoggerFactory.getLogger(callerClass);
 39  0
     }
 40  
 
 41  
     @Override
 42  
     public void message(String message, Object... replaces) {
 43  0
         logger.info(message, replaces);
 44  0
     }
 45  
 
 46  
     @Override
 47  
     public void debug(String message, Object... replaces) {
 48  0
         logger.debug(message, replaces);
 49  0
     }
 50  
 
 51  
     @Override
 52  
     public void warn(String message, Object... replaces) {
 53  0
         logger.warn(message, replaces);
 54  0
     }
 55  
 
 56  
     @Override
 57  
     public void trace(String message, Object... replaces) {
 58  0
         logger.trace(message, replaces);
 59  0
     }
 60  
 
 61  
     @Override
 62  
     public void error(String message, Object... replaces) {
 63  0
         logger.error(message, replaces);
 64  0
     }
 65  
 
 66  
     @Override
 67  
     public void error(Throwable e) {
 68  0
         logger.error(e.getMessage(), e);
 69  0
     }
 70  
 
 71  
     @Override
 72  
     public void error(Exception e, String message) {
 73  0
         logger.error(message, e);
 74  0
     }
 75  
 }