KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > poi > util > NullLogger


1
2 /* ====================================================================
3    Copyright 2002-2004 Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16 ==================================================================== */

17         
18
19 package org.apache.poi.util;
20
21 import java.util.*;
22
23 /**
24  * A logger class that strives to make it as easy as possible for
25  * developers to write log calls, while simultaneously making those
26  * calls as cheap as possible by performing lazy evaluation of the log
27  * message.<p>
28  *
29  * @author Marc Johnson (mjohnson at apache dot org)
30  * @author Glen Stampoultzis (glens at apache.org)
31  * @author Nicola Ken Barozzi (nicolaken at apache.org)
32  */

33
34 public class NullLogger extends POILogger
35 {
36     public void initialize(final String JavaDoc cat)
37     {
38        //do nothing
39
}
40     
41     /**
42      * Log a message
43      *
44      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
45      * @param obj1 The object to log.
46      */

47
48     public void log(final int level, final Object JavaDoc obj1)
49     {
50         //do nothing
51
}
52
53     /**
54      * Check if a logger is enabled to log at the specified level
55      *
56      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
57      */

58
59     public boolean check(final int level)
60     {
61        return false;
62     }
63
64     /**
65      * Log a message. Lazily appends Object parameters together.
66      *
67      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
68      * @param obj1 first object to place in the message
69      * @param obj2 second object to place in the message
70      */

71
72     public void log(final int level, final Object JavaDoc obj1, final Object JavaDoc obj2)
73     {
74        //do nothing
75
}
76
77     /**
78      * Log a message. Lazily appends Object parameters together.
79      *
80      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
81      * @param obj1 first Object to place in the message
82      * @param obj2 second Object to place in the message
83      * @param obj3 third Object to place in the message
84      */

85
86     public void log(final int level, final Object JavaDoc obj1, final Object JavaDoc obj2,
87                     final Object JavaDoc obj3)
88     {
89        //do nothing
90
}
91
92     /**
93      * Log a message. Lazily appends Object parameters together.
94      *
95      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
96      * @param obj1 first Object to place in the message
97      * @param obj2 second Object to place in the message
98      * @param obj3 third Object to place in the message
99      * @param obj4 fourth Object to place in the message
100      */

101
102     public void log(final int level, final Object JavaDoc obj1, final Object JavaDoc obj2,
103                     final Object JavaDoc obj3, final Object JavaDoc obj4)
104     {
105        //do nothing
106
}
107
108     /**
109      * Log a message. Lazily appends Object parameters together.
110      *
111      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
112      * @param obj1 first Object to place in the message
113      * @param obj2 second Object to place in the message
114      * @param obj3 third Object to place in the message
115      * @param obj4 fourth Object to place in the message
116      * @param obj5 fifth Object to place in the message
117      */

118
119     public void log(final int level, final Object JavaDoc obj1, final Object JavaDoc obj2,
120                     final Object JavaDoc obj3, final Object JavaDoc obj4, final Object JavaDoc obj5)
121     {
122        //do nothing
123
}
124
125     /**
126      * Log a message. Lazily appends Object parameters together.
127      *
128      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
129      * @param obj1 first Object to place in the message
130      * @param obj2 second Object to place in the message
131      * @param obj3 third Object to place in the message
132      * @param obj4 fourth Object to place in the message
133      * @param obj5 fifth Object to place in the message
134      * @param obj6 sixth Object to place in the message
135      */

136
137     public void log(final int level, final Object JavaDoc obj1, final Object JavaDoc obj2,
138                     final Object JavaDoc obj3, final Object JavaDoc obj4, final Object JavaDoc obj5,
139                     final Object JavaDoc obj6)
140     {
141        //do nothing
142
}
143
144     /**
145      * Log a message. Lazily appends Object parameters together.
146      *
147      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
148      * @param obj1 first Object to place in the message
149      * @param obj2 second Object to place in the message
150      * @param obj3 third Object to place in the message
151      * @param obj4 fourth Object to place in the message
152      * @param obj5 fifth Object to place in the message
153      * @param obj6 sixth Object to place in the message
154      * @param obj7 seventh Object to place in the message
155      */

156
157     public void log(final int level, final Object JavaDoc obj1, final Object JavaDoc obj2,
158                     final Object JavaDoc obj3, final Object JavaDoc obj4, final Object JavaDoc obj5,
159                     final Object JavaDoc obj6, final Object JavaDoc obj7)
160     {
161        //do nothing
162
}
163
164     /**
165      * Log a message. Lazily appends Object parameters together.
166      *
167      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
168      * @param obj1 first Object to place in the message
169      * @param obj2 second Object to place in the message
170      * @param obj3 third Object to place in the message
171      * @param obj4 fourth Object to place in the message
172      * @param obj5 fifth Object to place in the message
173      * @param obj6 sixth Object to place in the message
174      * @param obj7 seventh Object to place in the message
175      * @param obj8 eighth Object to place in the message
176      */

177
178     public void log(final int level, final Object JavaDoc obj1, final Object JavaDoc obj2,
179                     final Object JavaDoc obj3, final Object JavaDoc obj4, final Object JavaDoc obj5,
180                     final Object JavaDoc obj6, final Object JavaDoc obj7, final Object JavaDoc obj8)
181     {
182        //do nothing
183
}
184
185     /**
186      * Log a message
187      *
188      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
189      * @param obj1 The object to log. This is converted to a string.
190      * @param exception An exception to be logged
191      */

192
193     public void log(final int level, final Object JavaDoc obj1,
194                     final Throwable JavaDoc exception)
195     {
196        //do nothing
197
}
198
199     /**
200      * Log a message. Lazily appends Object parameters together.
201      *
202      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
203      * @param obj1 first Object to place in the message
204      * @param obj2 second Object to place in the message
205      * @param exception An exception to be logged
206      */

207
208     public void log(final int level, final Object JavaDoc obj1, final Object JavaDoc obj2,
209                     final Throwable JavaDoc exception)
210     {
211        //do nothing
212
}
213
214     /**
215      * Log a message. Lazily appends Object parameters together.
216      *
217      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
218      * @param obj1 first Object to place in the message
219      * @param obj2 second Object to place in the message
220      * @param obj3 third object to place in the message
221      * @param exception An error message to be logged
222      */

223
224     public void log(final int level, final Object JavaDoc obj1, final Object JavaDoc obj2,
225                     final Object JavaDoc obj3, final Throwable JavaDoc exception)
226     {
227        //do nothing
228
}
229
230     /**
231      * Log a message. Lazily appends Object parameters together.
232      *
233      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
234      * @param obj1 first Object to place in the message
235      * @param obj2 second Object to place in the message
236      * @param obj3 third object to place in the message
237      * @param obj4 fourth object to place in the message
238      * @param exception An exception to be logged
239      */

240
241     public void log(final int level, final Object JavaDoc obj1, final Object JavaDoc obj2,
242                     final Object JavaDoc obj3, final Object JavaDoc obj4,
243                     final Throwable JavaDoc exception)
244     {
245        //do nothing
246
}
247
248     /**
249      * Log a message. Lazily appends Object parameters together.
250      *
251      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
252      * @param obj1 first Object to place in the message
253      * @param obj2 second Object to place in the message
254      * @param obj3 third object to place in the message
255      * @param obj4 fourth object to place in the message
256      * @param obj5 fifth object to place in the message
257      * @param exception An exception to be logged
258      */

259
260     public void log(final int level, final Object JavaDoc obj1, final Object JavaDoc obj2,
261                     final Object JavaDoc obj3, final Object JavaDoc obj4, final Object JavaDoc obj5,
262                     final Throwable JavaDoc exception)
263     {
264        //do nothing
265
}
266
267     /**
268      * Log a message. Lazily appends Object parameters together.
269      *
270      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
271      * @param obj1 first Object to place in the message
272      * @param obj2 second Object to place in the message
273      * @param obj3 third object to place in the message
274      * @param obj4 fourth object to place in the message
275      * @param obj5 fifth object to place in the message
276      * @param obj6 sixth object to place in the message
277      * @param exception An exception to be logged
278      */

279
280     public void log(final int level, final Object JavaDoc obj1, final Object JavaDoc obj2,
281                     final Object JavaDoc obj3, final Object JavaDoc obj4, final Object JavaDoc obj5,
282                     final Object JavaDoc obj6, final Throwable JavaDoc exception)
283     {
284        //do nothing
285
}
286
287     /**
288      * Log a message. Lazily appends Object parameters together.
289      *
290      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
291      * @param obj1 first Object to place in the message
292      * @param obj2 second Object to place in the message
293      * @param obj3 third object to place in the message
294      * @param obj4 fourth object to place in the message
295      * @param obj5 fifth object to place in the message
296      * @param obj6 sixth object to place in the message
297      * @param obj7 seventh object to place in the message
298      * @param exception An exception to be logged
299      */

300
301     public void log(final int level, final Object JavaDoc obj1, final Object JavaDoc obj2,
302                     final Object JavaDoc obj3, final Object JavaDoc obj4, final Object JavaDoc obj5,
303                     final Object JavaDoc obj6, final Object JavaDoc obj7,
304                     final Throwable JavaDoc exception)
305     {
306       //do nothing
307
}
308
309     /**
310      * Log a message. Lazily appends Object parameters together.
311      *
312      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
313      * @param obj1 first Object to place in the message
314      * @param obj2 second Object to place in the message
315      * @param obj3 third object to place in the message
316      * @param obj4 fourth object to place in the message
317      * @param obj5 fifth object to place in the message
318      * @param obj6 sixth object to place in the message
319      * @param obj7 seventh object to place in the message
320      * @param obj8 eighth object to place in the message
321      * @param exception An exception to be logged
322      */

323
324     public void log(final int level, final Object JavaDoc obj1, final Object JavaDoc obj2,
325                     final Object JavaDoc obj3, final Object JavaDoc obj4, final Object JavaDoc obj5,
326                     final Object JavaDoc obj6, final Object JavaDoc obj7, final Object JavaDoc obj8,
327                     final Throwable JavaDoc exception)
328     {
329        //do nothing
330
}
331
332     /**
333      * Logs a formated message. The message itself may contain %
334      * characters as place holders. This routine will attempt to match
335      * the placeholder by looking at the type of parameter passed to
336      * obj1.<p>
337      *
338      * If the parameter is an array, it traverses the array first and
339      * matches parameters sequentially against the array items.
340      * Otherwise the parameters after <code>message</code> are matched
341      * in order.<p>
342      *
343      * If the place holder matches against a number it is printed as a
344      * whole number. This can be overridden by specifying a precision
345      * in the form %n.m where n is the padding for the whole part and
346      * m is the number of decimal places to display. n can be excluded
347      * if desired. n and m may not be more than 9.<p>
348      *
349      * If the last parameter (after flattening) is a Throwable it is
350      * logged specially.
351      *
352      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
353      * @param message The message to log.
354      * @param obj1 The first object to match against.
355      */

356
357     public void logFormatted(final int level, final String JavaDoc message,
358                              final Object JavaDoc obj1)
359     {
360        //do nothing
361
}
362
363     /**
364      * Logs a formated message. The message itself may contain %
365      * characters as place holders. This routine will attempt to match
366      * the placeholder by looking at the type of parameter passed to
367      * obj1.<p>
368      *
369      * If the parameter is an array, it traverses the array first and
370      * matches parameters sequentially against the array items.
371      * Otherwise the parameters after <code>message</code> are matched
372      * in order.<p>
373      *
374      * If the place holder matches against a number it is printed as a
375      * whole number. This can be overridden by specifying a precision
376      * in the form %n.m where n is the padding for the whole part and
377      * m is the number of decimal places to display. n can be excluded
378      * if desired. n and m may not be more than 9.<p>
379      *
380      * If the last parameter (after flattening) is a Throwable it is
381      * logged specially.
382      *
383      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
384      * @param message The message to log.
385      * @param obj1 The first object to match against.
386      * @param obj2 The second object to match against.
387      */

388
389     public void logFormatted(final int level, final String JavaDoc message,
390                              final Object JavaDoc obj1, final Object JavaDoc obj2)
391     {
392        //do nothing
393
}
394
395     /**
396      * Logs a formated message. The message itself may contain %
397      * characters as place holders. This routine will attempt to match
398      * the placeholder by looking at the type of parameter passed to
399      * obj1.<p>
400      *
401      * If the parameter is an array, it traverses the array first and
402      * matches parameters sequentially against the array items.
403      * Otherwise the parameters after <code>message</code> are matched
404      * in order.<p>
405      *
406      * If the place holder matches against a number it is printed as a
407      * whole number. This can be overridden by specifying a precision
408      * in the form %n.m where n is the padding for the whole part and
409      * m is the number of decimal places to display. n can be excluded
410      * if desired. n and m may not be more than 9.<p>
411      *
412      * If the last parameter (after flattening) is a Throwable it is
413      * logged specially.
414      *
415      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
416      * @param message The message to log.
417      * @param obj1 The first object to match against.
418      * @param obj2 The second object to match against.
419      * @param obj3 The third object to match against.
420      */

421
422     public void logFormatted(final int level, final String JavaDoc message,
423                              final Object JavaDoc obj1, final Object JavaDoc obj2,
424                              final Object JavaDoc obj3)
425     {
426        //do nothing
427
}
428
429     /**
430      * Logs a formated message. The message itself may contain %
431      * characters as place holders. This routine will attempt to match
432      * the placeholder by looking at the type of parameter passed to
433      * obj1.<p>
434      *
435      * If the parameter is an array, it traverses the array first and
436      * matches parameters sequentially against the array items.
437      * Otherwise the parameters after <code>message</code> are matched
438      * in order.<p>
439      *
440      * If the place holder matches against a number it is printed as a
441      * whole number. This can be overridden by specifying a precision
442      * in the form %n.m where n is the padding for the whole part and
443      * m is the number of decimal places to display. n can be excluded
444      * if desired. n and m may not be more than 9.<p>
445      *
446      * If the last parameter (after flattening) is a Throwable it is
447      * logged specially.
448      *
449      * @param level One of DEBUG, INFO, WARN, ERROR, FATAL
450      * @param message The message to log.
451      * @param obj1 The first object to match against.
452      * @param obj2 The second object to match against.
453      * @param obj3 The third object to match against.
454      * @param obj4 The forth object to match against.
455      */

456
457     public void logFormatted(final int level, final String JavaDoc message,
458                              final Object JavaDoc obj1, final Object JavaDoc obj2,
459                              final Object JavaDoc obj3, final Object JavaDoc obj4)
460     {
461        //do nothing
462
}
463
464 }
465
466
Popular Tags