Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
SilentLog |
|
| 1.0;1 |
1 | package org.apache.maven.plugin.testing; | |
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 | * This logger implements both types of logs currently in use. It can be injected where needed | |
27 | * to turn off logs during testing where they aren't desired. | |
28 | * | |
29 | * @author <a href="mailto:brianf@apache.org">Brian Fox</a> | |
30 | * @version $Id: SilentLog.java 785452 2009-06-17 00:00:18Z olamy $ | |
31 | */ | |
32 | 2 | public class SilentLog |
33 | implements Log, Logger | |
34 | { | |
35 | /** | |
36 | * @return <code>false</code> | |
37 | * @see org.apache.maven.plugin.logging.Log#isDebugEnabled() | |
38 | */ | |
39 | public boolean isDebugEnabled() | |
40 | { | |
41 | 2 | return false; |
42 | } | |
43 | ||
44 | /** | |
45 | * By default, do nothing. | |
46 | * | |
47 | * @see org.apache.maven.plugin.logging.Log#debug(java.lang.CharSequence) | |
48 | */ | |
49 | public void debug( CharSequence content ) | |
50 | { | |
51 | // nop | |
52 | 1 | } |
53 | ||
54 | /** | |
55 | * By default, do nothing. | |
56 | * | |
57 | * @see org.apache.maven.plugin.logging.Log#debug(java.lang.CharSequence, java.lang.Throwable) | |
58 | */ | |
59 | public void debug( CharSequence content, Throwable error ) | |
60 | { | |
61 | // nop | |
62 | 1 | } |
63 | ||
64 | /** | |
65 | * By default, do nothing. | |
66 | * | |
67 | * @see org.apache.maven.plugin.logging.Log#debug(java.lang.Throwable) | |
68 | */ | |
69 | public void debug( Throwable error ) | |
70 | { | |
71 | // nop | |
72 | 1 | } |
73 | ||
74 | /** | |
75 | * @return <code>false</code> | |
76 | * @see org.apache.maven.plugin.logging.Log#isInfoEnabled() | |
77 | */ | |
78 | public boolean isInfoEnabled() | |
79 | { | |
80 | 2 | return false; |
81 | } | |
82 | ||
83 | /** | |
84 | * By default, do nothing. | |
85 | * | |
86 | * @see org.apache.maven.plugin.logging.Log#info(java.lang.CharSequence) | |
87 | */ | |
88 | public void info( CharSequence content ) | |
89 | { | |
90 | // nop | |
91 | 1 | } |
92 | ||
93 | /** | |
94 | * By default, do nothing. | |
95 | * | |
96 | * @see org.apache.maven.plugin.logging.Log#info(java.lang.CharSequence, java.lang.Throwable) | |
97 | */ | |
98 | public void info( CharSequence content, Throwable error ) | |
99 | { | |
100 | // nop | |
101 | 1 | } |
102 | ||
103 | /** | |
104 | * By default, do nothing. | |
105 | * | |
106 | * @see org.apache.maven.plugin.logging.Log#info(java.lang.Throwable) | |
107 | */ | |
108 | public void info( Throwable error ) | |
109 | { | |
110 | // nop | |
111 | 1 | } |
112 | ||
113 | /** | |
114 | * By default, do nothing. | |
115 | * | |
116 | * @see org.apache.maven.plugin.logging.Log#isWarnEnabled() | |
117 | */ | |
118 | public boolean isWarnEnabled() | |
119 | { | |
120 | // nop | |
121 | 2 | return false; |
122 | } | |
123 | ||
124 | /** | |
125 | * By default, do nothing. | |
126 | * | |
127 | * @see org.apache.maven.plugin.logging.Log#warn(java.lang.CharSequence) | |
128 | */ | |
129 | public void warn( CharSequence content ) | |
130 | { | |
131 | // nop | |
132 | 1 | } |
133 | ||
134 | /** | |
135 | * By default, do nothing. | |
136 | * | |
137 | * @see org.apache.maven.plugin.logging.Log#warn(java.lang.CharSequence, java.lang.Throwable) | |
138 | */ | |
139 | public void warn( CharSequence content, Throwable error ) | |
140 | { | |
141 | // nop | |
142 | 1 | } |
143 | ||
144 | /** | |
145 | * By default, do nothing. | |
146 | * | |
147 | * @see org.apache.maven.plugin.logging.Log#warn(java.lang.Throwable) | |
148 | */ | |
149 | public void warn( Throwable error ) | |
150 | { | |
151 | // nop | |
152 | 1 | } |
153 | ||
154 | /** | |
155 | * @return <code>false</code> | |
156 | * @see org.apache.maven.plugin.logging.Log#isErrorEnabled() | |
157 | */ | |
158 | public boolean isErrorEnabled() | |
159 | { | |
160 | 2 | return false; |
161 | } | |
162 | ||
163 | /** | |
164 | * By default, do nothing. | |
165 | * | |
166 | * @see org.apache.maven.plugin.logging.Log#error(java.lang.CharSequence) | |
167 | */ | |
168 | public void error( CharSequence content ) | |
169 | { | |
170 | // nop | |
171 | 1 | } |
172 | ||
173 | /** | |
174 | * By default, do nothing. | |
175 | * | |
176 | * @see org.apache.maven.plugin.logging.Log#error(java.lang.CharSequence, java.lang.Throwable) | |
177 | */ | |
178 | public void error( CharSequence content, Throwable error ) | |
179 | { | |
180 | // nop | |
181 | 1 | } |
182 | ||
183 | /** | |
184 | * By default, do nothing. | |
185 | * | |
186 | * @see org.apache.maven.plugin.logging.Log#error(java.lang.Throwable) | |
187 | */ | |
188 | public void error( Throwable error ) | |
189 | { | |
190 | // nop | |
191 | 1 | } |
192 | ||
193 | /** | |
194 | * By default, do nothing. | |
195 | * | |
196 | * @see org.codehaus.plexus.logging.Logger#debug(java.lang.String) | |
197 | */ | |
198 | public void debug( String message ) | |
199 | { | |
200 | // nop | |
201 | 1 | } |
202 | ||
203 | /** | |
204 | * By default, do nothing. | |
205 | * | |
206 | * @see org.codehaus.plexus.logging.Logger#debug(java.lang.String, java.lang.Throwable) | |
207 | */ | |
208 | public void debug( String message, Throwable throwable ) | |
209 | { | |
210 | // nop | |
211 | 1 | } |
212 | ||
213 | /** | |
214 | * By default, do nothing. | |
215 | * | |
216 | * @see org.codehaus.plexus.logging.Logger#info(java.lang.String) | |
217 | */ | |
218 | public void info( String message ) | |
219 | { | |
220 | // nop | |
221 | 1 | } |
222 | ||
223 | /** | |
224 | * By default, do nothing. | |
225 | * | |
226 | * @see org.codehaus.plexus.logging.Logger#info(java.lang.String, java.lang.Throwable) | |
227 | */ | |
228 | public void info( String message, Throwable throwable ) | |
229 | { | |
230 | // nop | |
231 | 1 | } |
232 | ||
233 | /** | |
234 | * By default, do nothing. | |
235 | * | |
236 | * @see org.codehaus.plexus.logging.Logger#warn(java.lang.String) | |
237 | */ | |
238 | public void warn( String message ) | |
239 | { | |
240 | // nop | |
241 | 1 | } |
242 | ||
243 | /** | |
244 | * By default, do nothing. | |
245 | * | |
246 | * @see org.codehaus.plexus.logging.Logger#warn(java.lang.String, java.lang.Throwable) | |
247 | */ | |
248 | public void warn( String message, Throwable throwable ) | |
249 | { | |
250 | // nop | |
251 | 1 | } |
252 | ||
253 | /** | |
254 | * By default, do nothing. | |
255 | * | |
256 | * @see org.codehaus.plexus.logging.Logger#error(java.lang.String) | |
257 | */ | |
258 | public void error( String message ) | |
259 | { | |
260 | // nop | |
261 | 1 | } |
262 | ||
263 | /** | |
264 | * By default, do nothing. | |
265 | * | |
266 | * @see org.codehaus.plexus.logging.Logger#error(java.lang.String, java.lang.Throwable) | |
267 | */ | |
268 | public void error( String message, Throwable throwable ) | |
269 | { | |
270 | // nop | |
271 | 1 | } |
272 | ||
273 | /** | |
274 | * By default, do nothing. | |
275 | * | |
276 | * @see org.codehaus.plexus.logging.Logger#fatalError(java.lang.String) | |
277 | */ | |
278 | public void fatalError( String message ) | |
279 | { | |
280 | // nop | |
281 | 1 | } |
282 | ||
283 | /** | |
284 | * By default, do nothing. | |
285 | * | |
286 | * @see org.codehaus.plexus.logging.Logger#fatalError(java.lang.String, java.lang.Throwable) | |
287 | */ | |
288 | public void fatalError( String message, Throwable throwable ) | |
289 | { | |
290 | // nop | |
291 | 1 | } |
292 | ||
293 | /** | |
294 | * @return <code>false</code> | |
295 | * @see org.codehaus.plexus.logging.Logger#isFatalErrorEnabled() | |
296 | */ | |
297 | public boolean isFatalErrorEnabled() | |
298 | { | |
299 | 1 | return false; |
300 | } | |
301 | ||
302 | /** | |
303 | * @return <code>null</code> | |
304 | * @see org.codehaus.plexus.logging.Logger#getChildLogger(java.lang.String) | |
305 | */ | |
306 | public Logger getChildLogger( String name ) | |
307 | { | |
308 | 1 | return null; |
309 | } | |
310 | ||
311 | /** | |
312 | * @return <code>0</code> | |
313 | * @see org.codehaus.plexus.logging.Logger#getThreshold() | |
314 | */ | |
315 | public int getThreshold() | |
316 | { | |
317 | 1 | return 0; |
318 | } | |
319 | ||
320 | /** | |
321 | * @return <code>null</code> | |
322 | * @see org.codehaus.plexus.logging.Logger#getName() | |
323 | */ | |
324 | public String getName() | |
325 | { | |
326 | 1 | return null; |
327 | } | |
328 | ||
329 | public void setThreshold( int threshold ) | |
330 | { | |
331 | // TODO Auto-generated method stub | |
332 | ||
333 | 0 | } |
334 | } |