Coverage Report - org.apache.maven.monitor.logging.DefaultLog
 
Classes in this File Line Coverage Branch Coverage Complexity
DefaultLog
0 %
0/34
0 %
0/2
1,111
 
 1  
 package org.apache.maven.monitor.logging;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one
 5  
  * or more contributor license agreements.  See the NOTICE file
 6  
  * distributed with this work for additional information
 7  
  * regarding copyright ownership.  The ASF licenses this file
 8  
  * to you under the Apache License, Version 2.0 (the
 9  
  * "License"); you may not use this file except in compliance
 10  
  * with the License.  You may obtain a copy of the License at
 11  
  *
 12  
  *  http://www.apache.org/licenses/LICENSE-2.0
 13  
  *
 14  
  * Unless required by applicable law or agreed to in writing,
 15  
  * software distributed under the License is distributed on an
 16  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 17  
  * KIND, either express or implied.  See the License for the
 18  
  * specific language governing permissions and limitations
 19  
  * under the License.
 20  
  */
 21  
 
 22  
 import org.apache.maven.plugin.logging.Log;
 23  
 import org.codehaus.plexus.logging.Logger;
 24  
 
 25  
 /**
 26  
  * @author jdcasey
 27  
  */
 28  
 public class DefaultLog
 29  
     implements Log
 30  
 {
 31  
 
 32  
     private final Logger logger;
 33  
 
 34  
     public DefaultLog( Logger logger )
 35  0
     {
 36  0
         this.logger = logger;
 37  0
     }
 38  
 
 39  
     public void debug( CharSequence content )
 40  
     {
 41  0
         logger.debug( toString( content ) );
 42  0
     }
 43  
 
 44  
     private String toString( CharSequence content )
 45  
     {
 46  0
         if ( content == null )
 47  
         {
 48  0
             return "";
 49  
         }
 50  
         else
 51  
         {
 52  0
             return content.toString();
 53  
         }
 54  
     }
 55  
 
 56  
     public void debug( CharSequence content, Throwable error )
 57  
     {
 58  0
         logger.debug( toString( content ), error );
 59  0
     }
 60  
 
 61  
     public void debug( Throwable error )
 62  
     {
 63  0
         logger.debug( "", error );
 64  0
     }
 65  
 
 66  
     public void info( CharSequence content )
 67  
     {
 68  0
         logger.info( toString( content ) );
 69  0
     }
 70  
 
 71  
     public void info( CharSequence content, Throwable error )
 72  
     {
 73  0
         logger.info( toString( content ), error );
 74  0
     }
 75  
 
 76  
     public void info( Throwable error )
 77  
     {
 78  0
         logger.info( "", error );
 79  0
     }
 80  
 
 81  
     public void warn( CharSequence content )
 82  
     {
 83  0
         logger.warn( toString( content ) );
 84  0
     }
 85  
 
 86  
     public void warn( CharSequence content, Throwable error )
 87  
     {
 88  0
         logger.warn( toString( content ), error );
 89  0
     }
 90  
 
 91  
     public void warn( Throwable error )
 92  
     {
 93  0
         logger.warn( "", error );
 94  0
     }
 95  
 
 96  
     public void error( CharSequence content )
 97  
     {
 98  0
         logger.error( toString( content ) );
 99  0
     }
 100  
 
 101  
     public void error( CharSequence content, Throwable error )
 102  
     {
 103  0
         logger.error( toString( content ), error );
 104  0
     }
 105  
 
 106  
     public void error( Throwable error )
 107  
     {
 108  0
         logger.error( "", error );
 109  0
     }
 110  
 
 111  
     public boolean isDebugEnabled()
 112  
     {
 113  0
         return logger.isDebugEnabled();
 114  
     }
 115  
 
 116  
     public boolean isInfoEnabled()
 117  
     {
 118  0
         return logger.isInfoEnabled();
 119  
     }
 120  
 
 121  
     public boolean isWarnEnabled()
 122  
     {
 123  0
         return logger.isWarnEnabled();
 124  
     }
 125  
 
 126  
     public boolean isErrorEnabled()
 127  
     {
 128  0
         return logger.isErrorEnabled();
 129  
     }
 130  
 
 131  
 }