View Javadoc
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.<br>
25   * There should be no big surprises here, although you may notice that the methods accept
26   * <code>java.lang.CharSequence</code> rather than <code>java.lang.String</code>. This is provided mainly as a
27   * convenience, to enable developers to pass things like <code>java.lang.StringBuffer</code> directly into the logger,
28   * rather than formatting first by calling <code>toString()</code>.
29   *
30   * @author jdcasey
31   *
32   * @deprecated Use SLF4J directly
33   */
34  @Deprecated
35  public interface Log
36  {
37      /**
38       * @return true if the <b>debug</b> error level is enabled
39       */
40      boolean isDebugEnabled();
41  
42      /**
43       * Send a message to the user in the <b>debug</b> error level.
44       *
45       * @param content
46       */
47      void debug( CharSequence content );
48  
49      /**
50       * Send a message (and accompanying exception) to the user in the <b>debug</b> error level.<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.<br>
60       * The stack trace for this exception will be output when this error level is enabled.
61       *
62       * @param error
63       */
64      void debug( Throwable error );
65  
66      /**
67       * @return true if the <b>info</b> error level is enabled
68       */
69      boolean isInfoEnabled();
70  
71      /**
72       * Send a message to the user in the <b>info</b> error level.
73       *
74       * @param content
75       */
76      void info( CharSequence content );
77  
78      /**
79       * Send a message (and accompanying exception) to the user in the <b>info</b> error level.<br>
80       * The error's stacktrace will be output when this error level is enabled.
81       *
82       * @param content
83       * @param error
84       */
85      void info( CharSequence content, Throwable error );
86  
87      /**
88       * Send an exception to the user in the <b>info</b> error level.<br>
89       * The stack trace for this exception will be output when this error level is enabled.
90       *
91       * @param error
92       */
93      void info( Throwable error );
94  
95      /**
96       * @return true if the <b>warn</b> error level is enabled
97       */
98      boolean isWarnEnabled();
99  
100     /**
101      * Send a message to the user in the <b>warn</b> error level.
102      *
103      * @param content
104      */
105     void warn( CharSequence content );
106 
107     /**
108      * Send a message (and accompanying exception) to the user in the <b>warn</b> error level.<br>
109      * The error's stacktrace will be output when this error level is enabled.
110      *
111      * @param content
112      * @param error
113      */
114     void warn( CharSequence content, Throwable error );
115 
116     /**
117      * Send an exception to the user in the <b>warn</b> error level.<br>
118      * The stack trace for this exception will be output when this error level is enabled.
119      *
120      * @param error
121      */
122     void warn( Throwable error );
123 
124     /**
125      * @return true if the <b>error</b> error level is enabled
126      */
127     boolean isErrorEnabled();
128 
129     /**
130      * Send a message to the user in the <b>error</b> error level.
131      *
132      * @param content
133      */
134     void error( CharSequence content );
135 
136     /**
137      * Send a message (and accompanying exception) to the user in the <b>error</b> error level.<br>
138      * The error's stacktrace will be output when this error level is enabled.
139      *
140      * @param content
141      * @param error
142      */
143     void error( CharSequence content, Throwable error );
144 
145     /**
146      * Send an exception to the user in the <b>error</b> error level.<br>
147      * The stack trace for this exception will be output when this error level is enabled.
148      *
149      * @param error
150      */
151     void error( Throwable error );
152 }