Coverage Report - org.apache.commons.transaction.util.Log4jLogger
 
Classes in this File Line Coverage Branch Coverage Complexity
Log4jLogger
0%
0/24
N/A
1
 
 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to You under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  *
 9  
  *     http://www.apache.org/licenses/LICENSE-2.0
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.apache.commons.transaction.util;
 18  
 
 19  
 import org.apache.log4j.Logger;
 20  
 
 21  
 /**
 22  
  * Default logger implementation. Uses log4j logging.
 23  
  *
 24  
  * @version $Id: Log4jLogger.java 493628 2007-01-07 01:42:48Z joerg $
 25  
  */
 26  
 public class Log4jLogger implements LoggerFacade {
 27  
     
 28  
     protected Logger logger;
 29  
     
 30  0
     public Log4jLogger(Logger logger) {
 31  0
         this.logger = logger;
 32  0
     }
 33  
 
 34  
     public Logger getLogger() {
 35  0
         return logger;
 36  
     }
 37  
 
 38  
     public LoggerFacade createLogger(String name) {
 39  0
         return new Log4jLogger(Logger.getLogger(name));
 40  
     }
 41  
 
 42  
     public void logInfo(String message) {
 43  0
         logger.info(message);
 44  0
     }
 45  
 
 46  
     public void logFine(String message) {
 47  0
         logger.debug(message);
 48  0
     }
 49  
 
 50  
     public boolean isFineEnabled() {
 51  0
         return logger.isDebugEnabled();
 52  
     }
 53  
 
 54  
     public void logFiner(String message) {
 55  0
         logger.debug(message);
 56  0
     }
 57  
 
 58  
     public boolean isFinerEnabled() {
 59  0
         return logger.isDebugEnabled();
 60  
     }
 61  
 
 62  
     public void logFinest(String message) {
 63  0
         logger.debug(message);
 64  0
     }
 65  
 
 66  
     public boolean isFinestEnabled() {
 67  0
         return logger.isDebugEnabled();
 68  
     }
 69  
 
 70  
     public void logWarning(String message) {
 71  0
         logger.warn(message);
 72  0
     }
 73  
 
 74  
     public void logWarning(String message, Throwable t) {
 75  0
         logger.warn(message, t);
 76  0
     }
 77  
     public void logSevere(String message) {
 78  0
         logger.error(message);
 79  0
     }
 80  
 
 81  
     public void logSevere(String message, Throwable t) {
 82  0
         logger.error(message, t);
 83  0
     }
 84  
 }