blob: 33701e993b8db7a95dfe40d8847c62712480a672 [file] [log] [blame]
Felix Meschberger1fd58292009-10-02 12:59:27 +00001/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19package org.apache.felix.scrplugin;
20
21
22/**
23 * This interface supplies the API for providing feedback to the user from
24 * SCR descriptor generation process using whatever means is implemented. There
25 * should be no big surprises here.
26 */
Carsten Ziegeler55c96d32012-06-13 12:03:35 +000027public interface Log {
28
Felix Meschberger1fd58292009-10-02 12:59:27 +000029 /**
30 * @return true if the <b>debug</b> error level is enabled
31 */
32 boolean isDebugEnabled();
33
34
35 /**
36 * Send a message to the user in the <b>debug</b> error level.
37 *
38 * @param content
39 */
40 void debug( String content );
41
42
43 /**
44 * Send a message (and accompanying exception) to the user in the <b>debug</b> error level.
45 * <br/>
46 * The error's stacktrace will be output when this error level is enabled.
47 *
48 * @param content
49 * @param error
50 */
51 void debug( String content, Throwable error );
52
53
54 /**
55 * Send an exception to the user in the <b>debug</b> error level.
56 * <br/>
57 * The stack trace for this exception will be output when this error level is enabled.
58 *
59 * @param error
60 */
61 void debug( Throwable error );
62
63
64 /**
65 * @return true if the <b>info</b> error level is enabled
66 */
67 boolean isInfoEnabled();
68
69
70 /**
71 * Send a message to the user in the <b>info</b> error level.
72 *
73 * @param content
74 */
75 void info( String content );
76
77
78 /**
79 * Send a message (and accompanying exception) to the user in the <b>info</b> error level.
80 * <br/>
81 * The error's stacktrace will be output when this error level is enabled.
82 *
83 * @param content
84 * @param error
85 */
86 void info( String content, Throwable error );
87
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 /**
100 * @return true if the <b>warn</b> error level is enabled
101 */
102 boolean isWarnEnabled();
103
104
105 /**
106 * Send a message to the user in the <b>warn</b> error level.
107 *
108 * @param content
109 */
110 void warn( String content );
111
Felix Meschberger1fd58292009-10-02 12:59:27 +0000112 /**
113 * Send a message (and accompanying exception) to the user in the <b>warn</b> error level.
114 * <br/>
115 * The error's stacktrace will be output when this error level is enabled.
116 *
117 * @param content
Felix Meschbergerd6b7f212009-10-06 12:41:34 +0000118 * @param location The location at which the error occurred
119 * @param lineNumber The line number at which the error occurred
120 */
121 void warn( String content, String location, int lineNumber );
122
Carsten Ziegeler86eb9952012-09-03 06:59:18 +0000123 /**
124 * Send a message (and accompanying exception) to the user in the <b>warn</b> error level.
125 * <br/>
126 * The error's stacktrace will be output when this error level is enabled.
127 *
128 * @param content
129 * @param location The location at which the error occurred
130 * @param lineNumber The line number at which the error occurred
131 * @param columnNumber The column number at which the error occurred
132 */
133 void warn( String content, String location, int lineNumber, int columnNumber );
134
Felix Meschbergerd6b7f212009-10-06 12:41:34 +0000135
136 /**
137 * Send a message (and accompanying exception) to the user in the <b>warn</b> error level.
138 * <br/>
139 * The error's stacktrace will be output when this error level is enabled.
140 *
141 * @param content
Felix Meschberger1fd58292009-10-02 12:59:27 +0000142 * @param error
143 */
144 void warn( String content, Throwable error );
145
146
147 /**
148 * Send an exception to the user in the <b>warn</b> error level.
149 * <br/>
150 * The stack trace for this exception will be output when this error level is enabled.
151 *
152 * @param error
153 */
154 void warn( Throwable error );
155
156
157 /**
158 * @return true if the <b>error</b> error level is enabled
159 */
160 boolean isErrorEnabled();
161
162
163 /**
164 * Send a message to the user in the <b>error</b> error level.
165 *
166 * @param content
167 */
168 void error( String content );
169
170
171 /**
172 * Send a message (and accompanying exception) to the user in the <b>error</b> error level.
173 * <br/>
174 * The error's stacktrace will be output when this error level is enabled.
175 *
176 * @param content
Felix Meschbergerd6b7f212009-10-06 12:41:34 +0000177 * @param location The location at which the error occurred
178 * @param lineNumber The line number at which the error occurred
179 */
180 void error( String content, String location, int lineNumber );
181
Carsten Ziegeler86eb9952012-09-03 06:59:18 +0000182 /**
183 * Send a message (and accompanying exception) to the user in the <b>error</b> error level.
184 * <br/>
185 * The error's stacktrace will be output when this error level is enabled.
186 *
187 * @param content
188 * @param location The location at which the error occurred
189 * @param lineNumber The line number at which the error occurred
190 * @param columnNumber The column number at which the error occurred
191 */
192 void error( String content, String location, int lineNumber, int columnNumber );
193
Felix Meschbergerd6b7f212009-10-06 12:41:34 +0000194
195 /**
196 * Send a message (and accompanying exception) to the user in the <b>error</b> error level.
197 * <br/>
198 * The error's stacktrace will be output when this error level is enabled.
199 *
200 * @param content
Felix Meschberger1fd58292009-10-02 12:59:27 +0000201 * @param error
202 */
203 void error( String content, Throwable error );
204
205
206 /**
207 * Send an exception to the user in the <b>error</b> error level.
208 * <br/>
209 * The stack trace for this exception will be output when this error level is enabled.
210 *
211 * @param error
212 */
213 void error( Throwable error );
214}