Coverage Report - org.apache.maven.plugin.logging.Log
 
Classes in this File Line Coverage Branch Coverage Complexity
Log
N/A
N/A
1
 
 1  
 package org.apache.maven.plugin.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  
 /**
 23  
  * This interface supplies the API for providing feedback to the user from the <code>Mojo</code>, using standard
 24  
  * <code>Maven</code> channels.
 25  
  * <br/>
 26  
  * There should be no big surprises here, although you may notice that the methods accept
 27  
  * <code>java.lang.CharSequence</code> rather than <code>java.lang.String</code>. This is provided mainly as a
 28  
  * convenience, to enable developers to pass things like <code>java.lang.StringBuffer</code> directly into the logger,
 29  
  * rather than formatting first by calling <code>toString()</code>.
 30  
  *
 31  
  * @author jdcasey
 32  
  * @version $Id: Log.java 495147 2007-01-11 07:47:53Z jvanzyl $
 33  
  */
 34  
 public interface Log
 35  
 {
 36  
     /**
 37  
      * @return true if the <b>debug</b> error level is enabled
 38  
      */
 39  
     boolean isDebugEnabled();
 40  
 
 41  
     /**
 42  
      * Send a message to the user in the <b>debug</b> error level.
 43  
      *
 44  
      * @param content
 45  
      */
 46  
     void debug( CharSequence content );
 47  
 
 48  
     /**
 49  
      * Send a message (and accompanying exception) to the user in the <b>debug</b> error level.
 50  
      * <br/>
 51  
      * The error's stacktrace will be output when this error level is enabled.
 52  
      *
 53  
      * @param content
 54  
      * @param error
 55  
      */
 56  
     void debug( CharSequence content, Throwable error );
 57  
 
 58  
     /**
 59  
      * Send an exception to the user in the <b>debug</b> error level.
 60  
      * <br/>
 61  
      * The stack trace for this exception will be output when this error level is enabled.
 62  
      *
 63  
      * @param error
 64  
      */
 65  
     void debug( Throwable error );
 66  
 
 67  
     /**
 68  
      * @return true if the <b>info</b> error level is enabled
 69  
      */
 70  
     boolean isInfoEnabled();
 71  
 
 72  
     /**
 73  
      * Send a message to the user in the <b>info</b> error level.
 74  
      *
 75  
      * @param content
 76  
      */
 77  
     void info( CharSequence content );
 78  
 
 79  
     /**
 80  
      * Send a message (and accompanying exception) to the user in the <b>info</b> error level.
 81  
      * <br/>
 82  
      * The error's stacktrace will be output when this error level is enabled.
 83  
      *
 84  
      * @param content
 85  
      * @param error
 86  
      */
 87  
     void info( CharSequence content, Throwable error );
 88  
 
 89  
     /**
 90  
      * Send an exception to the user in the <b>info</b> error level.
 91  
      * <br/>
 92  
      * The stack trace for this exception will be output when this error level is enabled.
 93  
      *
 94  
      * @param error
 95  
      */
 96  
     void info( Throwable error );
 97  
 
 98  
     /**
 99  
      * @return true if the <b>warn</b> error level is enabled
 100  
      */
 101  
     boolean isWarnEnabled();
 102  
 
 103  
     /**
 104  
      * Send a message to the user in the <b>warn</b> error level.
 105  
      *
 106  
      * @param content
 107  
      */
 108  
     void warn( CharSequence content );
 109  
 
 110  
     /**
 111  
      * Send a message (and accompanying exception) to the user in the <b>warn</b> error level.
 112  
      * <br/>
 113  
      * The error's stacktrace will be output when this error level is enabled.
 114  
      *
 115  
      * @param content
 116  
      * @param error
 117  
      */
 118  
     void warn( CharSequence content, Throwable error );
 119  
 
 120  
     /**
 121  
      * Send an exception to the user in the <b>warn</b> error level.
 122  
      * <br/>
 123  
      * The stack trace for this exception will be output when this error level is enabled.
 124  
      *
 125  
      * @param error
 126  
      */
 127  
     void warn( Throwable error );
 128  
 
 129  
     /**
 130  
      * @return true if the <b>error</b> error level is enabled
 131  
      */
 132  
     boolean isErrorEnabled();
 133  
 
 134  
     /**
 135  
      * Send a message to the user in the <b>error</b> error level.
 136  
      *
 137  
      * @param content
 138  
      */
 139  
     void error( CharSequence content );
 140  
 
 141  
     /**
 142  
      * Send a message (and accompanying exception) to the user in the <b>error</b> error level.
 143  
      * <br/>
 144  
      * The error's stacktrace will be output when this error level is enabled.
 145  
      *
 146  
      * @param content
 147  
      * @param error
 148  
      */
 149  
     void error( CharSequence content, Throwable error );
 150  
 
 151  
     /**
 152  
      * Send an exception to the user in the <b>error</b> error level.
 153  
      * <br/>
 154  
      * The stack trace for this exception will be output when this error level is enabled.
 155  
      *
 156  
      * @param error
 157  
      */
 158  
     void error( Throwable error );
 159  
 }