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