1 /*
2  * JBoss, Home of Professional Open Source.
3  *
4  * Copyright 2011 Red Hat, Inc.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * 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, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 package org.jboss.logging;
20
21 import java.io.Serializable;
22 import java.lang.reflect.Constructor;
23 import java.lang.reflect.InvocationTargetException;
24 import java.security.PrivilegedAction;
25 import java.util.Locale;
26
27 import static java.security.AccessController.doPrivileged;
28
29 /**
30  * An abstracted logging entry point.
31  */

32 public abstract class Logger implements Serializable, BasicLogger {
33
34     private static final long serialVersionUID = 4232175575988879434L;
35
36     private static final String FQCN = Logger.class.getName();
37
38     /**
39      * Levels used by this logging API.
40      */

41     public enum Level {
42         FATAL,
43         ERROR,
44         WARN,
45         INFO,
46         DEBUG,
47         TRACE,
48     }
49
50     private final String name;
51
52     /**
53      * Construct a new instance.
54      *
55      * @param name the logger category name
56      */

57     protected Logger(final String name) {
58         this.name = name;
59     }
60
61     /**
62      * Return the name of this logger.
63      *
64      * @return The name of this logger.
65      */

66     public String getName() {
67         return name;
68     }
69
70     /**
71      * Implementation log method (standard parameter formatting).
72      *
73      * @param level the level
74      * @param loggerClassName the logger class name
75      * @param message the message to log
76      * @param parameters the parameters of the message
77      * @param thrown the exception which was thrown, if any
78      */

79     protected abstract void doLog(Level level, String loggerClassName, Object message, Object[] parameters, Throwable thrown);
80
81     /**
82      * Implementation log method (printf formatting).
83      *
84      * @param level the level
85      * @param loggerClassName the logger class name
86      * @param format the format string to log
87      * @param parameters the parameters of the message
88      * @param thrown the exception which was thrown, if any
89      */

90     protected abstract void doLogf(Level level, String loggerClassName, String format, Object[] parameters, Throwable thrown);
91
92     /**
93      * Check to see if the {@code TRACE} level is enabled for this logger.
94      *
95      * @return {@code trueif messages logged at {@link Level#TRACE} may be accepted, {@code false} otherwise
96      */

97     public boolean isTraceEnabled() {
98         return isEnabled(Level.TRACE);
99     }
100
101     /**
102      * Issue a log message with a level of TRACE.
103      *
104      * @param message the message
105      */

106     public void trace(Object message) {
107         doLog(Level.TRACE, FQCN, message, nullnull);
108     }
109
110     /**
111      * Issue a log message and throwable with a level of TRACE.
112      *
113      * @param message the message
114      * @param t the throwable
115      */

116     public void trace(Object message, Throwable t) {
117         doLog(Level.TRACE, FQCN, message, null, t);
118     }
119
120     /**
121      * Issue a log message and throwable with a level of TRACE and a specific logger class name.
122      *
123      * @param loggerFqcn the logger class name
124      * @param message the message
125      * @param t the throwable
126      */

127     public void trace(String loggerFqcn, Object message, Throwable t) {
128         doLog(Level.TRACE, loggerFqcn, message, null, t);
129     }
130
131     /**
132      * Issue a log message with parameters with a level of TRACE.
133      *
134      * @param message the message
135      * @param params the message parameters
136      * @deprecated To log a message with parameters, using {@link #tracev(String, Object...)} is recommended.
137      */

138     @Deprecated
139     public void trace(Object message, Object[] params) {
140         doLog(Level.TRACE, FQCN, message, params, null);
141     }
142
143     /**
144      * Issue a log message with parameters and a throwable with a level of TRACE.
145      *
146      * @param message the message
147      * @param params the message parameters
148      * @param t the throwable
149      * @deprecated To log a message with parameters, using {@link #tracev(Throwable, String, Object...)} is recommended.
150      */

151     @Deprecated
152     public void trace(Object message, Object[] params, Throwable t) {
153         doLog(Level.TRACE, FQCN, message, params, t);
154     }
155
156     /**
157      * Issue a log message with parameters and a throwable with a level of TRACE.
158      *
159      * @param loggerFqcn the logger class name
160      * @param message the message
161      * @param params the message parameters
162      * @param t the throwable
163      */

164     public void trace(String loggerFqcn, Object message, Object[] params, Throwable t) {
165         doLog(Level.TRACE, loggerFqcn, message, params, t);
166     }
167
168     /**
169      * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
170      *
171      * @param format the message format string
172      * @param params the parameters
173      */

174     public void tracev(String format, Object... params) {
175         doLog(Level.TRACE, FQCN, format, params, null);
176     }
177
178     /**
179      * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
180      *
181      * @param format the message format string
182      * @param param1 the sole parameter
183      */

184     public void tracev(String format, Object param1) {
185         if (isEnabled(Level.TRACE)) {
186             doLog(Level.TRACE, FQCN, format, new Object[] { param1 }, null);
187         }
188     }
189
190     /**
191      * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
192      *
193      * @param format the message format string
194      * @param param1 the first parameter
195      * @param param2 the second parameter
196      */

197     public void tracev(String format, Object param1, Object param2) {
198         if (isEnabled(Level.TRACE)) {
199             doLog(Level.TRACE, FQCN, format, new Object[] { param1, param2 }, null);
200         }
201     }
202
203     /**
204      * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
205      *
206      * @param format the message format string
207      * @param param1 the first parameter
208      * @param param2 the second parameter
209      * @param param3 the third parameter
210      */

211     public void tracev(String format, Object param1, Object param2, Object param3) {
212         if (isEnabled(Level.TRACE)) {
213             doLog(Level.TRACE, FQCN, format, new Object[] { param1, param2, param3 }, null);
214         }
215     }
216
217     /**
218      * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
219      *
220      * @param t the throwable
221      * @param format the message format string
222      * @param params the parameters
223      */

224     public void tracev(Throwable t, String format, Object... params) {
225         doLog(Level.TRACE, FQCN, format, params, t);
226     }
227
228     /**
229      * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
230      *
231      * @param t the throwable
232      * @param format the message format string
233      * @param param1 the sole parameter
234      */

235     public void tracev(Throwable t, String format, Object param1) {
236         if (isEnabled(Level.TRACE)) {
237             doLog(Level.TRACE, FQCN, format, new Object[] { param1 }, t);
238         }
239     }
240
241     /**
242      * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
243      *
244      * @param t the throwable
245      * @param format the message format string
246      * @param param1 the first parameter
247      * @param param2 the second parameter
248      */

249     public void tracev(Throwable t, String format, Object param1, Object param2) {
250         if (isEnabled(Level.TRACE)) {
251             doLog(Level.TRACE, FQCN, format, new Object[] { param1, param2 }, t);
252         }
253     }
254
255     /**
256      * Issue a log message with a level of TRACE using {@link java.text.MessageFormat}-style formatting.
257      *
258      * @param t the throwable
259      * @param format the message format string
260      * @param param1 the first parameter
261      * @param param2 the second parameter
262      * @param param3 the third parameter
263      */

264     public void tracev(Throwable t, String format, Object param1, Object param2, Object param3) {
265         if (isEnabled(Level.TRACE)) {
266             doLog(Level.TRACE, FQCN, format, new Object[] { param1, param2, param3 }, t);
267         }
268     }
269
270     /**
271      * Issue a formatted log message with a level of TRACE.
272      *
273      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
274      * @param params the parameters
275      */

276     public void tracef(String format, Object... params) {
277         doLogf(Level.TRACE, FQCN, format, params, null);
278     }
279
280     /**
281      * Issue a formatted log message with a level of TRACE.
282      *
283      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
284      * @param param1 the sole parameter
285      */

286     public void tracef(String format, Object param1) {
287         if (isEnabled(Level.TRACE)) {
288             doLogf(Level.TRACE, FQCN, format, new Object[] { param1 }, null);
289         }
290     }
291
292     /**
293      * Issue a formatted log message with a level of TRACE.
294      *
295      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
296      * @param param1 the first parameter
297      * @param param2 the second parameter
298      */

299     public void tracef(String format, Object param1, Object param2) {
300         if (isEnabled(Level.TRACE)) {
301             doLogf(Level.TRACE, FQCN, format, new Object[] { param1, param2 }, null);
302         }
303     }
304
305     /**
306      * Issue a formatted log message with a level of TRACE.
307      *
308      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
309      * @param param1 the first parameter
310      * @param param2 the second parameter
311      * @param param3 the third parameter
312      */

313     public void tracef(String format, Object param1, Object param2, Object param3) {
314         if (isEnabled(Level.TRACE)) {
315             doLogf(Level.TRACE, FQCN, format, new Object[] { param1, param2, param3 }, null);
316         }
317     }
318
319     /**
320      * Issue a formatted log message with a level of TRACE.
321      *
322      * @param t the throwable
323      * @param format the format string, as per {@link String#format(String, Object...)}
324      * @param params the parameters
325      */

326     public void tracef(Throwable t, String format, Object... params) {
327         doLogf(Level.TRACE, FQCN, format, params, t);
328     }
329
330     /**
331      * Issue a formatted log message with a level of TRACE.
332      *
333      * @param t the throwable
334      * @param format the format string, as per {@link String#format(String, Object...)}
335      * @param param1 the sole parameter
336      */

337     public void tracef(Throwable t, String format, Object param1) {
338         if (isEnabled(Level.TRACE)) {
339             doLogf(Level.TRACE, FQCN, format, new Object[] { param1 }, t);
340         }
341     }
342
343     /**
344      * Issue a formatted log message with a level of TRACE.
345      *
346      * @param t the throwable
347      * @param format the format string, as per {@link String#format(String, Object...)}
348      * @param param1 the first parameter
349      * @param param2 the second parameter
350      */

351     public void tracef(Throwable t, String format, Object param1, Object param2) {
352         if (isEnabled(Level.TRACE)) {
353             doLogf(Level.TRACE, FQCN, format, new Object[] { param1, param2 }, t);
354         }
355     }
356
357     /**
358      * Issue a formatted log message with a level of TRACE.
359      *
360      * @param t the throwable
361      * @param format the format string, as per {@link String#format(String, Object...)}
362      * @param param1 the first parameter
363      * @param param2 the second parameter
364      * @param param3 the third parameter
365      */

366     public void tracef(Throwable t, String format, Object param1, Object param2, Object param3) {
367         if (isEnabled(Level.TRACE)) {
368             doLogf(Level.TRACE, FQCN, format, new Object[] { param1, param2, param3 }, t);
369         }
370     }
371
372     public void tracef(final String format, final int arg) {
373         if (isEnabled(Level.TRACE)) {
374             doLogf(Level.TRACE, FQCN, format, new Object[] { arg }, null);
375         }
376     }
377
378     public void tracef(final String format, final int arg1, final int arg2) {
379         if (isEnabled(Level.TRACE)) {
380             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, null);
381         }
382     }
383
384     public void tracef(final String format, final int arg1, final Object arg2) {
385         if (isEnabled(Level.TRACE)) {
386             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, null);
387         }
388     }
389
390     public void tracef(final String format, final int arg1, final int arg2, final int arg3) {
391         if (isEnabled(Level.TRACE)) {
392             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, null);
393         }
394     }
395
396     public void tracef(final String format, final int arg1, final int arg2, final Object arg3) {
397         if (isEnabled(Level.TRACE)) {
398             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, null);
399         }
400     }
401
402     public void tracef(final String format, final int arg1, final Object arg2, final Object arg3) {
403         if (isEnabled(Level.TRACE)) {
404             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, null);
405         }
406     }
407
408     public void tracef(final Throwable t, final String format, final int arg) {
409         if (isEnabled(Level.TRACE)) {
410             doLogf(Level.TRACE, FQCN, format, new Object[] { arg }, t);
411         }
412     }
413
414     public void tracef(final Throwable t, final String format, final int arg1, final int arg2) {
415         if (isEnabled(Level.TRACE)) {
416             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, t);
417         }
418     }
419
420     public void tracef(final Throwable t, final String format, final int arg1, final Object arg2) {
421         if (isEnabled(Level.TRACE)) {
422             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, t);
423         }
424     }
425
426     public void tracef(final Throwable t, final String format, final int arg1, final int arg2, final int arg3) {
427         if (isEnabled(Level.TRACE)) {
428             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, t);
429         }
430     }
431
432     public void tracef(final Throwable t, final String format, final int arg1, final int arg2, final Object arg3) {
433         if (isEnabled(Level.TRACE)) {
434             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, t);
435         }
436     }
437
438     public void tracef(final Throwable t, final String format, final int arg1, final Object arg2, final Object arg3) {
439         if (isEnabled(Level.TRACE)) {
440             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, t);
441         }
442     }
443
444     public void tracef(final String format, final long arg) {
445         if (isEnabled(Level.TRACE)) {
446             doLogf(Level.TRACE, FQCN, format, new Object[] { arg }, null);
447         }
448     }
449
450     public void tracef(final String format, final long arg1, final long arg2) {
451         if (isEnabled(Level.TRACE)) {
452             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, null);
453         }
454     }
455
456     public void tracef(final String format, final long arg1, final Object arg2) {
457         if (isEnabled(Level.TRACE)) {
458             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, null);
459         }
460     }
461
462     public void tracef(final String format, final long arg1, final long arg2, final long arg3) {
463         if (isEnabled(Level.TRACE)) {
464             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, null);
465         }
466     }
467
468     public void tracef(final String format, final long arg1, final long arg2, final Object arg3) {
469         if (isEnabled(Level.TRACE)) {
470             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, null);
471         }
472     }
473
474     public void tracef(final String format, final long arg1, final Object arg2, final Object arg3) {
475         if (isEnabled(Level.TRACE)) {
476             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, null);
477         }
478     }
479
480     public void tracef(final Throwable t, final String format, final long arg) {
481         if (isEnabled(Level.TRACE)) {
482             doLogf(Level.TRACE, FQCN, format, new Object[] { arg }, t);
483         }
484     }
485
486     public void tracef(final Throwable t, final String format, final long arg1, final long arg2) {
487         if (isEnabled(Level.TRACE)) {
488             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, t);
489         }
490     }
491
492     public void tracef(final Throwable t, final String format, final long arg1, final Object arg2) {
493         if (isEnabled(Level.TRACE)) {
494             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2 }, t);
495         }
496     }
497
498     public void tracef(final Throwable t, final String format, final long arg1, final long arg2, final long arg3) {
499         if (isEnabled(Level.TRACE)) {
500             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, t);
501         }
502     }
503
504     public void tracef(final Throwable t, final String format, final long arg1, final long arg2, final Object arg3) {
505         if (isEnabled(Level.TRACE)) {
506             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, t);
507         }
508     }
509
510     public void tracef(final Throwable t, final String format, final long arg1, final Object arg2, final Object arg3) {
511         if (isEnabled(Level.TRACE)) {
512             doLogf(Level.TRACE, FQCN, format, new Object[] { arg1, arg2, arg3 }, t);
513         }
514     }
515
516     /**
517      * Check to see if the {@code DEBUG} level is enabled for this logger.
518      *
519      * @return {@code trueif messages logged at {@link Level#DEBUG} may be accepted, {@code false} otherwise
520      */

521     public boolean isDebugEnabled() {
522         return isEnabled(Level.DEBUG);
523     }
524
525     /**
526      * Issue a log message with a level of DEBUG.
527      *
528      * @param message the message
529      */

530     public void debug(Object message) {
531         doLog(Level.DEBUG, FQCN, message, nullnull);
532     }
533
534     /**
535      * Issue a log message and throwable with a level of DEBUG.
536      *
537      * @param message the message
538      * @param t the throwable
539      */

540     public void debug(Object message, Throwable t) {
541         doLog(Level.DEBUG, FQCN, message, null, t);
542     }
543
544     /**
545      * Issue a log message and throwable with a level of DEBUG and a specific logger class name.
546      *
547      * @param loggerFqcn the logger class name
548      * @param message the message
549      * @param t the throwable
550      */

551     public void debug(String loggerFqcn, Object message, Throwable t) {
552         doLog(Level.DEBUG, loggerFqcn, message, null, t);
553     }
554
555     /**
556      * Issue a log message with parameters with a level of DEBUG.
557      *
558      * @param message the message
559      * @param params the message parameters
560      * @deprecated To log a message with parameters, using {@link #debugv(String, Object...)} is recommended.
561      */

562     @Deprecated
563     public void debug(Object message, Object[] params) {
564         doLog(Level.DEBUG, FQCN, message, params, null);
565     }
566
567     /**
568      * Issue a log message with parameters and a throwable with a level of DEBUG.
569      *
570      * @param message the message
571      * @param params the message parameters
572      * @param t the throwable
573      * @deprecated To log a message with parameters, using {@link #debugv(Throwable, String, Object...)} is recommended.
574      */

575     @Deprecated
576     public void debug(Object message, Object[] params, Throwable t) {
577         doLog(Level.DEBUG, FQCN, message, params, t);
578     }
579
580     /**
581      * Issue a log message with parameters and a throwable with a level of DEBUG.
582      *
583      * @param loggerFqcn the logger class name
584      * @param message the message
585      * @param params the message parameters
586      * @param t the throwable
587      */

588     public void debug(String loggerFqcn, Object message, Object[] params, Throwable t) {
589         doLog(Level.DEBUG, loggerFqcn, message, params, t);
590     }
591
592     /**
593      * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
594      *
595      * @param format the message format string
596      * @param params the parameters
597      */

598     public void debugv(String format, Object... params) {
599         doLog(Level.DEBUG, FQCN, format, params, null);
600     }
601
602     /**
603      * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
604      *
605      * @param format the message format string
606      * @param param1 the sole parameter
607      */

608     public void debugv(String format, Object param1) {
609         if (isEnabled(Level.DEBUG)) {
610             doLog(Level.DEBUG, FQCN, format, new Object[] { param1 }, null);
611         }
612     }
613
614     /**
615      * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
616      *
617      * @param format the message format string
618      * @param param1 the first parameter
619      * @param param2 the second parameter
620      */

621     public void debugv(String format, Object param1, Object param2) {
622         if (isEnabled(Level.DEBUG)) {
623             doLog(Level.DEBUG, FQCN, format, new Object[] { param1, param2 }, null);
624         }
625     }
626
627     /**
628      * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
629      *
630      * @param format the message format string
631      * @param param1 the first parameter
632      * @param param2 the second parameter
633      * @param param3 the third parameter
634      */

635     public void debugv(String format, Object param1, Object param2, Object param3) {
636         if (isEnabled(Level.DEBUG)) {
637             doLog(Level.DEBUG, FQCN, format, new Object[] { param1, param2, param3 }, null);
638         }
639     }
640
641     /**
642      * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
643      *
644      * @param t the throwable
645      * @param format the message format string
646      * @param params the parameters
647      */

648     public void debugv(Throwable t, String format, Object... params) {
649         doLog(Level.DEBUG, FQCN, format, params, t);
650     }
651
652     /**
653      * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
654      *
655      * @param t the throwable
656      * @param format the message format string
657      * @param param1 the sole parameter
658      */

659     public void debugv(Throwable t, String format, Object param1) {
660         if (isEnabled(Level.DEBUG)) {
661             doLog(Level.DEBUG, FQCN, format, new Object[] { param1 }, t);
662         }
663     }
664
665     /**
666      * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
667      *
668      * @param t the throwable
669      * @param format the message format string
670      * @param param1 the first parameter
671      * @param param2 the second parameter
672      */

673     public void debugv(Throwable t, String format, Object param1, Object param2) {
674         if (isEnabled(Level.DEBUG)) {
675             doLog(Level.DEBUG, FQCN, format, new Object[] { param1, param2 }, t);
676         }
677     }
678
679     /**
680      * Issue a log message with a level of DEBUG using {@link java.text.MessageFormat}-style formatting.
681      *
682      * @param t the throwable
683      * @param format the message format string
684      * @param param1 the first parameter
685      * @param param2 the second parameter
686      * @param param3 the third parameter
687      */

688     public void debugv(Throwable t, String format, Object param1, Object param2, Object param3) {
689         if (isEnabled(Level.DEBUG)) {
690             doLog(Level.DEBUG, FQCN, format, new Object[] { param1, param2, param3 }, t);
691         }
692     }
693
694     /**
695      * Issue a formatted log message with a level of DEBUG.
696      *
697      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
698      * @param params the parameters
699      */

700     public void debugf(String format, Object... params) {
701         doLogf(Level.DEBUG, FQCN, format, params, null);
702     }
703
704     /**
705      * Issue a formatted log message with a level of DEBUG.
706      *
707      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
708      * @param param1 the sole parameter
709      */

710     public void debugf(String format, Object param1) {
711         if (isEnabled(Level.DEBUG)) {
712             doLogf(Level.DEBUG, FQCN, format, new Object[] { param1 }, null);
713         }
714     }
715
716     /**
717      * Issue a formatted log message with a level of DEBUG.
718      *
719      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
720      * @param param1 the first parameter
721      * @param param2 the second parameter
722      */

723     public void debugf(String format, Object param1, Object param2) {
724         if (isEnabled(Level.DEBUG)) {
725             doLogf(Level.DEBUG, FQCN, format, new Object[] { param1, param2 }, null);
726         }
727     }
728
729     /**
730      * Issue a formatted log message with a level of DEBUG.
731      *
732      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
733      * @param param1 the first parameter
734      * @param param2 the second parameter
735      * @param param3 the third parameter
736      */

737     public void debugf(String format, Object param1, Object param2, Object param3) {
738         if (isEnabled(Level.DEBUG)) {
739             doLogf(Level.DEBUG, FQCN, format, new Object[] { param1, param2, param3 }, null);
740         }
741     }
742
743     /**
744      * Issue a formatted log message with a level of DEBUG.
745      *
746      * @param t the throwable
747      * @param format the format string, as per {@link String#format(String, Object...)}
748      * @param params the parameters
749      */

750     public void debugf(Throwable t, String format, Object... params) {
751         doLogf(Level.DEBUG, FQCN, format, params, t);
752     }
753
754     /**
755      * Issue a formatted log message with a level of DEBUG.
756      *
757      * @param t the throwable
758      * @param format the format string, as per {@link String#format(String, Object...)}
759      * @param param1 the sole parameter
760      */

761     public void debugf(Throwable t, String format, Object param1) {
762         if (isEnabled(Level.DEBUG)) {
763             doLogf(Level.DEBUG, FQCN, format, new Object[] { param1 }, t);
764         }
765     }
766
767     /**
768      * Issue a formatted log message with a level of DEBUG.
769      *
770      * @param t the throwable
771      * @param format the format string, as per {@link String#format(String, Object...)}
772      * @param param1 the first parameter
773      * @param param2 the second parameter
774      */

775     public void debugf(Throwable t, String format, Object param1, Object param2) {
776         if (isEnabled(Level.DEBUG)) {
777             doLogf(Level.DEBUG, FQCN, format, new Object[] { param1, param2 }, t);
778         }
779     }
780
781     /**
782      * Issue a formatted log message with a level of DEBUG.
783      *
784      * @param t the throwable
785      * @param format the format string, as per {@link String#format(String, Object...)}
786      * @param param1 the first parameter
787      * @param param2 the second parameter
788      * @param param3 the third parameter
789      */

790     public void debugf(Throwable t, String format, Object param1, Object param2, Object param3) {
791         if (isEnabled(Level.DEBUG)) {
792             doLogf(Level.DEBUG, FQCN, format, new Object[] { param1, param2, param3 }, t);
793         }
794     }
795
796     public void debugf(final String format, final int arg) {
797         if (isEnabled(Level.DEBUG)) {
798             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg }, null);
799         }
800     }
801
802     public void debugf(final String format, final int arg1, final int arg2) {
803         if (isEnabled(Level.DEBUG)) {
804             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, null);
805         }
806     }
807
808     public void debugf(final String format, final int arg1, final Object arg2) {
809         if (isEnabled(Level.DEBUG)) {
810             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, null);
811         }
812     }
813
814     public void debugf(final String format, final int arg1, final int arg2, final int arg3) {
815         if (isEnabled(Level.DEBUG)) {
816             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, null);
817         }
818     }
819
820     public void debugf(final String format, final int arg1, final int arg2, final Object arg3) {
821         if (isEnabled(Level.DEBUG)) {
822             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, null);
823         }
824     }
825
826     public void debugf(final String format, final int arg1, final Object arg2, final Object arg3) {
827         if (isEnabled(Level.DEBUG)) {
828             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, null);
829         }
830     }
831
832     public void debugf(final Throwable t, final String format, final int arg) {
833         if (isEnabled(Level.DEBUG)) {
834             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg }, t);
835         }
836     }
837
838     public void debugf(final Throwable t, final String format, final int arg1, final int arg2) {
839         if (isEnabled(Level.DEBUG)) {
840             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, t);
841         }
842     }
843
844     public void debugf(final Throwable t, final String format, final int arg1, final Object arg2) {
845         if (isEnabled(Level.DEBUG)) {
846             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, t);
847         }
848     }
849
850     public void debugf(final Throwable t, final String format, final int arg1, final int arg2, final int arg3) {
851         if (isEnabled(Level.DEBUG)) {
852             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, t);
853         }
854     }
855
856     public void debugf(final Throwable t, final String format, final int arg1, final int arg2, final Object arg3) {
857         if (isEnabled(Level.DEBUG)) {
858             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, t);
859         }
860     }
861
862     public void debugf(final Throwable t, final String format, final int arg1, final Object arg2, final Object arg3) {
863         if (isEnabled(Level.DEBUG)) {
864             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, t);
865         }
866     }
867
868     public void debugf(final String format, final long arg) {
869         if (isEnabled(Level.DEBUG)) {
870             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg }, null);
871         }
872     }
873
874     public void debugf(final String format, final long arg1, final long arg2) {
875         if (isEnabled(Level.DEBUG)) {
876             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, null);
877         }
878     }
879
880     public void debugf(final String format, final long arg1, final Object arg2) {
881         if (isEnabled(Level.DEBUG)) {
882             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, null);
883         }
884     }
885
886     public void debugf(final String format, final long arg1, final long arg2, final long arg3) {
887         if (isEnabled(Level.DEBUG)) {
888             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, null);
889         }
890     }
891
892     public void debugf(final String format, final long arg1, final long arg2, final Object arg3) {
893         if (isEnabled(Level.DEBUG)) {
894             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, null);
895         }
896     }
897
898     public void debugf(final String format, final long arg1, final Object arg2, final Object arg3) {
899         if (isEnabled(Level.DEBUG)) {
900             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, null);
901         }
902     }
903
904     public void debugf(final Throwable t, final String format, final long arg) {
905         if (isEnabled(Level.DEBUG)) {
906             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg }, t);
907         }
908     }
909
910     public void debugf(final Throwable t, final String format, final long arg1, final long arg2) {
911         if (isEnabled(Level.DEBUG)) {
912             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, t);
913         }
914     }
915
916     public void debugf(final Throwable t, final String format, final long arg1, final Object arg2) {
917         if (isEnabled(Level.DEBUG)) {
918             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2 }, t);
919         }
920     }
921
922     public void debugf(final Throwable t, final String format, final long arg1, final long arg2, final long arg3) {
923         if (isEnabled(Level.DEBUG)) {
924             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, t);
925         }
926     }
927
928     public void debugf(final Throwable t, final String format, final long arg1, final long arg2, final Object arg3) {
929         if (isEnabled(Level.DEBUG)) {
930             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, t);
931         }
932     }
933
934     public void debugf(final Throwable t, final String format, final long arg1, final Object arg2, final Object arg3) {
935         if (isEnabled(Level.DEBUG)) {
936             doLogf(Level.DEBUG, FQCN, format, new Object[] { arg1, arg2, arg3 }, t);
937         }
938     }
939
940     /**
941      * Check to see if the {@code INFO} level is enabled for this logger.
942      *
943      * @return {@code trueif messages logged at {@link Level#INFO} may be accepted, {@code false} otherwise
944      */

945     public boolean isInfoEnabled() {
946         return isEnabled(Level.INFO);
947     }
948
949     /**
950      * Issue a log message with a level of INFO.
951      *
952      * @param message the message
953      */

954     public void info(Object message) {
955         doLog(Level.INFO, FQCN, message, nullnull);
956     }
957
958     /**
959      * Issue a log message and throwable with a level of INFO.
960      *
961      * @param message the message
962      * @param t the throwable
963      */

964     public void info(Object message, Throwable t) {
965         doLog(Level.INFO, FQCN, message, null, t);
966     }
967
968     /**
969      * Issue a log message and throwable with a level of INFO and a specific logger class name.
970      *
971      * @param loggerFqcn the logger class name
972      * @param message the message
973      * @param t the throwable
974      */

975     public void info(String loggerFqcn, Object message, Throwable t) {
976         doLog(Level.INFO, loggerFqcn, message, null, t);
977     }
978
979     /**
980      * Issue a log message with parameters with a level of INFO.
981      *
982      * @param message the message
983      * @param params the message parameters
984      * @deprecated To log a message with parameters, using {@link #infov(String, Object...)} is recommended.
985      */

986     @Deprecated
987     public void info(Object message, Object[] params) {
988         doLog(Level.INFO, FQCN, message, params, null);
989     }
990
991     /**
992      * Issue a log message with parameters and a throwable with a level of INFO.
993      *
994      * @param message the message
995      * @param params the message parameters
996      * @param t the throwable
997      * @deprecated To log a message with parameters, using {@link #infov(Throwable, String, Object...)} is recommended.
998      */

999     @Deprecated
1000     public void info(Object message, Object[] params, Throwable t) {
1001         doLog(Level.INFO, FQCN, message, params, t);
1002     }
1003
1004     /**
1005      * Issue a log message with parameters and a throwable with a level of INFO.
1006      *
1007      * @param loggerFqcn the logger class name
1008      * @param message the message
1009      * @param params the message parameters
1010      * @param t the throwable
1011      */

1012     public void info(String loggerFqcn, Object message, Object[] params, Throwable t) {
1013         doLog(Level.INFO, loggerFqcn, message, params, t);
1014     }
1015
1016     /**
1017      * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
1018      *
1019      * @param format the message format string
1020      * @param params the parameters
1021      */

1022     public void infov(String format, Object... params) {
1023         doLog(Level.INFO, FQCN, format, params, null);
1024     }
1025
1026     /**
1027      * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
1028      *
1029      * @param format the message format string
1030      * @param param1 the sole parameter
1031      */

1032     public void infov(String format, Object param1) {
1033         if (isEnabled(Level.INFO)) {
1034             doLog(Level.INFO, FQCN, format, new Object[] { param1 }, null);
1035         }
1036     }
1037
1038     /**
1039      * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
1040      *
1041      * @param format the message format string
1042      * @param param1 the first parameter
1043      * @param param2 the second parameter
1044      */

1045     public void infov(String format, Object param1, Object param2) {
1046         if (isEnabled(Level.INFO)) {
1047             doLog(Level.INFO, FQCN, format, new Object[] { param1, param2 }, null);
1048         }
1049     }
1050
1051     /**
1052      * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
1053      *
1054      * @param format the message format string
1055      * @param param1 the first parameter
1056      * @param param2 the second parameter
1057      * @param param3 the third parameter
1058      */

1059     public void infov(String format, Object param1, Object param2, Object param3) {
1060         if (isEnabled(Level.INFO)) {
1061             doLog(Level.INFO, FQCN, format, new Object[] { param1, param2, param3 }, null);
1062         }
1063     }
1064
1065     /**
1066      * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
1067      *
1068      * @param t the throwable
1069      * @param format the message format string
1070      * @param params the parameters
1071      */

1072     public void infov(Throwable t, String format, Object... params) {
1073         doLog(Level.INFO, FQCN, format, params, t);
1074     }
1075
1076     /**
1077      * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
1078      *
1079      * @param t the throwable
1080      * @param format the message format string
1081      * @param param1 the sole parameter
1082      */

1083     public void infov(Throwable t, String format, Object param1) {
1084         if (isEnabled(Level.INFO)) {
1085             doLog(Level.INFO, FQCN, format, new Object[] { param1 }, t);
1086         }
1087     }
1088
1089     /**
1090      * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
1091      *
1092      * @param t the throwable
1093      * @param format the message format string
1094      * @param param1 the first parameter
1095      * @param param2 the second parameter
1096      */

1097     public void infov(Throwable t, String format, Object param1, Object param2) {
1098         if (isEnabled(Level.INFO)) {
1099             doLog(Level.INFO, FQCN, format, new Object[] { param1, param2 }, t);
1100         }
1101     }
1102
1103     /**
1104      * Issue a log message with a level of INFO using {@link java.text.MessageFormat}-style formatting.
1105      *
1106      * @param t the throwable
1107      * @param format the message format string
1108      * @param param1 the first parameter
1109      * @param param2 the second parameter
1110      * @param param3 the third parameter
1111      */

1112     public void infov(Throwable t, String format, Object param1, Object param2, Object param3) {
1113         if (isEnabled(Level.INFO)) {
1114             doLog(Level.INFO, FQCN, format, new Object[] { param1, param2, param3 }, t);
1115         }
1116     }
1117
1118     /**
1119      * Issue a formatted log message with a level of INFO.
1120      *
1121      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1122      * @param params the parameters
1123      */

1124     public void infof(String format, Object... params) {
1125         doLogf(Level.INFO, FQCN, format, params, null);
1126     }
1127
1128     /**
1129      * Issue a formatted log message with a level of INFO.
1130      *
1131      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1132      * @param param1 the sole parameter
1133      */

1134     public void infof(String format, Object param1) {
1135         if (isEnabled(Level.INFO)) {
1136             doLogf(Level.INFO, FQCN, format, new Object[] { param1 }, null);
1137         }
1138     }
1139
1140     /**
1141      * Issue a formatted log message with a level of INFO.
1142      *
1143      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1144      * @param param1 the first parameter
1145      * @param param2 the second parameter
1146      */

1147     public void infof(String format, Object param1, Object param2) {
1148         if (isEnabled(Level.INFO)) {
1149             doLogf(Level.INFO, FQCN, format, new Object[] { param1, param2 }, null);
1150         }
1151     }
1152
1153     /**
1154      * Issue a formatted log message with a level of INFO.
1155      *
1156      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1157      * @param param1 the first parameter
1158      * @param param2 the second parameter
1159      * @param param3 the third parameter
1160      */

1161     public void infof(String format, Object param1, Object param2, Object param3) {
1162         if (isEnabled(Level.INFO)) {
1163             doLogf(Level.INFO, FQCN, format, new Object[] { param1, param2, param3 }, null);
1164         }
1165     }
1166
1167     /**
1168      * Issue a formatted log message with a level of INFO.
1169      *
1170      * @param t the throwable
1171      * @param format the format string, as per {@link String#format(String, Object...)}
1172      * @param params the parameters
1173      */

1174     public void infof(Throwable t, String format, Object... params) {
1175         doLogf(Level.INFO, FQCN, format, params, t);
1176     }
1177
1178     /**
1179      * Issue a formatted log message with a level of INFO.
1180      *
1181      * @param t the throwable
1182      * @param format the format string, as per {@link String#format(String, Object...)}
1183      * @param param1 the sole parameter
1184      */

1185     public void infof(Throwable t, String format, Object param1) {
1186         if (isEnabled(Level.INFO)) {
1187             doLogf(Level.INFO, FQCN, format, new Object[] { param1 }, t);
1188         }
1189     }
1190
1191     /**
1192      * Issue a formatted log message with a level of INFO.
1193      *
1194      * @param t the throwable
1195      * @param format the format string, as per {@link String#format(String, Object...)}
1196      * @param param1 the first parameter
1197      * @param param2 the second parameter
1198      */

1199     public void infof(Throwable t, String format, Object param1, Object param2) {
1200         if (isEnabled(Level.INFO)) {
1201             doLogf(Level.INFO, FQCN, format, new Object[] { param1, param2 }, t);
1202         }
1203     }
1204
1205     /**
1206      * Issue a formatted log message with a level of INFO.
1207      *
1208      * @param t the throwable
1209      * @param format the format string, as per {@link String#format(String, Object...)}
1210      * @param param1 the first parameter
1211      * @param param2 the second parameter
1212      * @param param3 the third parameter
1213      */

1214     public void infof(Throwable t, String format, Object param1, Object param2, Object param3) {
1215         if (isEnabled(Level.INFO)) {
1216             doLogf(Level.INFO, FQCN, format, new Object[] { param1, param2, param3 }, t);
1217         }
1218     }
1219
1220     /**
1221      * Issue a log message with a level of WARN.
1222      *
1223      * @param message the message
1224      */

1225     public void warn(Object message) {
1226         doLog(Level.WARN, FQCN, message, nullnull);
1227     }
1228
1229     /**
1230      * Issue a log message and throwable with a level of WARN.
1231      *
1232      * @param message the message
1233      * @param t the throwable
1234      */

1235     public void warn(Object message, Throwable t) {
1236         doLog(Level.WARN, FQCN, message, null, t);
1237     }
1238
1239     /**
1240      * Issue a log message and throwable with a level of WARN and a specific logger class name.
1241      *
1242      * @param loggerFqcn the logger class name
1243      * @param message the message
1244      * @param t the throwable
1245      */

1246     public void warn(String loggerFqcn, Object message, Throwable t) {
1247         doLog(Level.WARN, loggerFqcn, message, null, t);
1248     }
1249
1250     /**
1251      * Issue a log message with parameters with a level of WARN.
1252      *
1253      * @param message the message
1254      * @param params the message parameters
1255      * @deprecated To log a message with parameters, using {@link #warnv(String, Object...)} is recommended.
1256      */

1257     @Deprecated
1258     public void warn(Object message, Object[] params) {
1259         doLog(Level.WARN, FQCN, message, params, null);
1260     }
1261
1262     /**
1263      * Issue a log message with parameters and a throwable with a level of WARN.
1264      *
1265      * @param message the message
1266      * @param params the message parameters
1267      * @param t the throwable
1268      * @deprecated To log a message with parameters, using {@link #warnv(Throwable, String, Object...)} is recommended.
1269      */

1270     @Deprecated
1271     public void warn(Object message, Object[] params, Throwable t) {
1272         doLog(Level.WARN, FQCN, message, params, t);
1273     }
1274
1275     /**
1276      * Issue a log message with parameters and a throwable with a level of WARN.
1277      *
1278      * @param loggerFqcn the logger class name
1279      * @param message the message
1280      * @param params the message parameters
1281      * @param t the throwable
1282      */

1283     public void warn(String loggerFqcn, Object message, Object[] params, Throwable t) {
1284         doLog(Level.WARN, loggerFqcn, message, params, t);
1285     }
1286
1287     /**
1288      * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
1289      *
1290      * @param format the message format string
1291      * @param params the parameters
1292      */

1293     public void warnv(String format, Object... params) {
1294         doLog(Level.WARN, FQCN, format, params, null);
1295     }
1296
1297     /**
1298      * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
1299      *
1300      * @param format the message format string
1301      * @param param1 the sole parameter
1302      */

1303     public void warnv(String format, Object param1) {
1304         if (isEnabled(Level.WARN)) {
1305             doLog(Level.WARN, FQCN, format, new Object[] { param1 }, null);
1306         }
1307     }
1308
1309     /**
1310      * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
1311      *
1312      * @param format the message format string
1313      * @param param1 the first parameter
1314      * @param param2 the second parameter
1315      */

1316     public void warnv(String format, Object param1, Object param2) {
1317         if (isEnabled(Level.WARN)) {
1318             doLog(Level.WARN, FQCN, format, new Object[] { param1, param2 }, null);
1319         }
1320     }
1321
1322     /**
1323      * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
1324      *
1325      * @param format the message format string
1326      * @param param1 the first parameter
1327      * @param param2 the second parameter
1328      * @param param3 the third parameter
1329      */

1330     public void warnv(String format, Object param1, Object param2, Object param3) {
1331         if (isEnabled(Level.WARN)) {
1332             doLog(Level.WARN, FQCN, format, new Object[] { param1, param2, param3 }, null);
1333         }
1334     }
1335
1336     /**
1337      * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
1338      *
1339      * @param t the throwable
1340      * @param format the message format string
1341      * @param params the parameters
1342      */

1343     public void warnv(Throwable t, String format, Object... params) {
1344         doLog(Level.WARN, FQCN, format, params, t);
1345     }
1346
1347     /**
1348      * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
1349      *
1350      * @param t the throwable
1351      * @param format the message format string
1352      * @param param1 the sole parameter
1353      */

1354     public void warnv(Throwable t, String format, Object param1) {
1355         if (isEnabled(Level.WARN)) {
1356             doLog(Level.WARN, FQCN, format, new Object[] { param1 }, t);
1357         }
1358     }
1359
1360     /**
1361      * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
1362      *
1363      * @param t the throwable
1364      * @param format the message format string
1365      * @param param1 the first parameter
1366      * @param param2 the second parameter
1367      */

1368     public void warnv(Throwable t, String format, Object param1, Object param2) {
1369         if (isEnabled(Level.WARN)) {
1370             doLog(Level.WARN, FQCN, format, new Object[] { param1, param2 }, t);
1371         }
1372     }
1373
1374     /**
1375      * Issue a log message with a level of WARN using {@link java.text.MessageFormat}-style formatting.
1376      *
1377      * @param t the throwable
1378      * @param format the message format string
1379      * @param param1 the first parameter
1380      * @param param2 the second parameter
1381      * @param param3 the third parameter
1382      */

1383     public void warnv(Throwable t, String format, Object param1, Object param2, Object param3) {
1384         if (isEnabled(Level.WARN)) {
1385             doLog(Level.WARN, FQCN, format, new Object[] { param1, param2, param3 }, t);
1386         }
1387     }
1388
1389     /**
1390      * Issue a formatted log message with a level of WARN.
1391      *
1392      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1393      * @param params the parameters
1394      */

1395     public void warnf(String format, Object... params) {
1396         doLogf(Level.WARN, FQCN, format, params, null);
1397     }
1398
1399     /**
1400      * Issue a formatted log message with a level of WARN.
1401      *
1402      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1403      * @param param1 the sole parameter
1404      */

1405     public void warnf(String format, Object param1) {
1406         if (isEnabled(Level.WARN)) {
1407             doLogf(Level.WARN, FQCN, format, new Object[] { param1 }, null);
1408         }
1409     }
1410
1411     /**
1412      * Issue a formatted log message with a level of WARN.
1413      *
1414      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1415      * @param param1 the first parameter
1416      * @param param2 the second parameter
1417      */

1418     public void warnf(String format, Object param1, Object param2) {
1419         if (isEnabled(Level.WARN)) {
1420             doLogf(Level.WARN, FQCN, format, new Object[] { param1, param2 }, null);
1421         }
1422     }
1423
1424     /**
1425      * Issue a formatted log message with a level of WARN.
1426      *
1427      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1428      * @param param1 the first parameter
1429      * @param param2 the second parameter
1430      * @param param3 the third parameter
1431      */

1432     public void warnf(String format, Object param1, Object param2, Object param3) {
1433         if (isEnabled(Level.WARN)) {
1434             doLogf(Level.WARN, FQCN, format, new Object[] { param1, param2, param3 }, null);
1435         }
1436     }
1437
1438     /**
1439      * Issue a formatted log message with a level of WARN.
1440      *
1441      * @param t the throwable
1442      * @param format the format string, as per {@link String#format(String, Object...)}
1443      * @param params the parameters
1444      */

1445     public void warnf(Throwable t, String format, Object... params) {
1446         doLogf(Level.WARN, FQCN, format, params, t);
1447     }
1448
1449     /**
1450      * Issue a formatted log message with a level of WARN.
1451      *
1452      * @param t the throwable
1453      * @param format the format string, as per {@link String#format(String, Object...)}
1454      * @param param1 the sole parameter
1455      */

1456     public void warnf(Throwable t, String format, Object param1) {
1457         if (isEnabled(Level.WARN)) {
1458             doLogf(Level.WARN, FQCN, format, new Object[] { param1 }, t);
1459         }
1460     }
1461
1462     /**
1463      * Issue a formatted log message with a level of WARN.
1464      *
1465      * @param t the throwable
1466      * @param format the format string, as per {@link String#format(String, Object...)}
1467      * @param param1 the first parameter
1468      * @param param2 the second parameter
1469      */

1470     public void warnf(Throwable t, String format, Object param1, Object param2) {
1471         if (isEnabled(Level.WARN)) {
1472             doLogf(Level.WARN, FQCN, format, new Object[] { param1, param2 }, t);
1473         }
1474     }
1475
1476     /**
1477      * Issue a formatted log message with a level of WARN.
1478      *
1479      * @param t the throwable
1480      * @param format the format string, as per {@link String#format(String, Object...)}
1481      * @param param1 the first parameter
1482      * @param param2 the second parameter
1483      * @param param3 the third parameter
1484      */

1485     public void warnf(Throwable t, String format, Object param1, Object param2, Object param3) {
1486         if (isEnabled(Level.WARN)) {
1487             doLogf(Level.WARN, FQCN, format, new Object[] { param1, param2, param3 }, t);
1488         }
1489     }
1490
1491     /**
1492      * Issue a log message with a level of ERROR.
1493      *
1494      * @param message the message
1495      */

1496     public void error(Object message) {
1497         doLog(Level.ERROR, FQCN, message, nullnull);
1498     }
1499
1500     /**
1501      * Issue a log message and throwable with a level of ERROR.
1502      *
1503      * @param message the message
1504      * @param t the throwable
1505      */

1506     public void error(Object message, Throwable t) {
1507         doLog(Level.ERROR, FQCN, message, null, t);
1508     }
1509
1510     /**
1511      * Issue a log message and throwable with a level of ERROR and a specific logger class name.
1512      *
1513      * @param loggerFqcn the logger class name
1514      * @param message the message
1515      * @param t the throwable
1516      */

1517     public void error(String loggerFqcn, Object message, Throwable t) {
1518         doLog(Level.ERROR, loggerFqcn, message, null, t);
1519     }
1520
1521     /**
1522      * Issue a log message with parameters with a level of ERROR.
1523      *
1524      * @param message the message
1525      * @param params the message parameters
1526      * @deprecated To log a message with parameters, using {@link #errorv(String, Object...)} is recommended.
1527      */

1528     @Deprecated
1529     public void error(Object message, Object[] params) {
1530         doLog(Level.ERROR, FQCN, message, params, null);
1531     }
1532
1533     /**
1534      * Issue a log message with parameters and a throwable with a level of ERROR.
1535      *
1536      * @param message the message
1537      * @param params the message parameters
1538      * @param t the throwable
1539      * @deprecated To log a message with parameters, using {@link #errorv(Throwable, String, Object...)} is recommended.
1540      */

1541     @Deprecated
1542     public void error(Object message, Object[] params, Throwable t) {
1543         doLog(Level.ERROR, FQCN, message, params, t);
1544     }
1545
1546     /**
1547      * Issue a log message with parameters and a throwable with a level of ERROR.
1548      *
1549      * @param loggerFqcn the logger class name
1550      * @param message the message
1551      * @param params the message parameters
1552      * @param t the throwable
1553      */

1554     public void error(String loggerFqcn, Object message, Object[] params, Throwable t) {
1555         doLog(Level.ERROR, loggerFqcn, message, params, t);
1556     }
1557
1558     /**
1559      * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
1560      *
1561      * @param format the message format string
1562      * @param params the parameters
1563      */

1564     public void errorv(String format, Object... params) {
1565         doLog(Level.ERROR, FQCN, format, params, null);
1566     }
1567
1568     /**
1569      * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
1570      *
1571      * @param format the message format string
1572      * @param param1 the sole parameter
1573      */

1574     public void errorv(String format, Object param1) {
1575         if (isEnabled(Level.ERROR)) {
1576             doLog(Level.ERROR, FQCN, format, new Object[] { param1 }, null);
1577         }
1578     }
1579
1580     /**
1581      * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
1582      *
1583      * @param format the message format string
1584      * @param param1 the first parameter
1585      * @param param2 the second parameter
1586      */

1587     public void errorv(String format, Object param1, Object param2) {
1588         if (isEnabled(Level.ERROR)) {
1589             doLog(Level.ERROR, FQCN, format, new Object[] { param1, param2 }, null);
1590         }
1591     }
1592
1593     /**
1594      * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
1595      *
1596      * @param format the message format string
1597      * @param param1 the first parameter
1598      * @param param2 the second parameter
1599      * @param param3 the third parameter
1600      */

1601     public void errorv(String format, Object param1, Object param2, Object param3) {
1602         if (isEnabled(Level.ERROR)) {
1603             doLog(Level.ERROR, FQCN, format, new Object[] { param1, param2, param3 }, null);
1604         }
1605     }
1606
1607     /**
1608      * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
1609      *
1610      * @param t the throwable
1611      * @param format the message format string
1612      * @param params the parameters
1613      */

1614     public void errorv(Throwable t, String format, Object... params) {
1615         doLog(Level.ERROR, FQCN, format, params, t);
1616     }
1617
1618     /**
1619      * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
1620      *
1621      * @param t the throwable
1622      * @param format the message format string
1623      * @param param1 the sole parameter
1624      */

1625     public void errorv(Throwable t, String format, Object param1) {
1626         if (isEnabled(Level.ERROR)) {
1627             doLog(Level.ERROR, FQCN, format, new Object[] { param1 }, t);
1628         }
1629     }
1630
1631     /**
1632      * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
1633      *
1634      * @param t the throwable
1635      * @param format the message format string
1636      * @param param1 the first parameter
1637      * @param param2 the second parameter
1638      */

1639     public void errorv(Throwable t, String format, Object param1, Object param2) {
1640         if (isEnabled(Level.ERROR)) {
1641             doLog(Level.ERROR, FQCN, format, new Object[] { param1, param2 }, t);
1642         }
1643     }
1644
1645     /**
1646      * Issue a log message with a level of ERROR using {@link java.text.MessageFormat}-style formatting.
1647      *
1648      * @param t the throwable
1649      * @param format the message format string
1650      * @param param1 the first parameter
1651      * @param param2 the second parameter
1652      * @param param3 the third parameter
1653      */

1654     public void errorv(Throwable t, String format, Object param1, Object param2, Object param3) {
1655         if (isEnabled(Level.ERROR)) {
1656             doLog(Level.ERROR, FQCN, format, new Object[] { param1, param2, param3 }, t);
1657         }
1658     }
1659
1660     /**
1661      * Issue a formatted log message with a level of ERROR.
1662      *
1663      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1664      * @param params the parameters
1665      */

1666     public void errorf(String format, Object... params) {
1667         doLogf(Level.ERROR, FQCN, format, params, null);
1668     }
1669
1670     /**
1671      * Issue a formatted log message with a level of ERROR.
1672      *
1673      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1674      * @param param1 the sole parameter
1675      */

1676     public void errorf(String format, Object param1) {
1677         if (isEnabled(Level.ERROR)) {
1678             doLogf(Level.ERROR, FQCN, format, new Object[] { param1 }, null);
1679         }
1680     }
1681
1682     /**
1683      * Issue a formatted log message with a level of ERROR.
1684      *
1685      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1686      * @param param1 the first parameter
1687      * @param param2 the second parameter
1688      */

1689     public void errorf(String format, Object param1, Object param2) {
1690         if (isEnabled(Level.ERROR)) {
1691             doLogf(Level.ERROR, FQCN, format, new Object[] { param1, param2 }, null);
1692         }
1693     }
1694
1695     /**
1696      * Issue a formatted log message with a level of ERROR.
1697      *
1698      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1699      * @param param1 the first parameter
1700      * @param param2 the second parameter
1701      * @param param3 the third parameter
1702      */

1703     public void errorf(String format, Object param1, Object param2, Object param3) {
1704         if (isEnabled(Level.ERROR)) {
1705             doLogf(Level.ERROR, FQCN, format, new Object[] { param1, param2, param3 }, null);
1706         }
1707     }
1708
1709     /**
1710      * Issue a formatted log message with a level of ERROR.
1711      *
1712      * @param t the throwable
1713      * @param format the format string, as per {@link String#format(String, Object...)}
1714      * @param params the parameters
1715      */

1716     public void errorf(Throwable t, String format, Object... params) {
1717         doLogf(Level.ERROR, FQCN, format, params, t);
1718     }
1719
1720     /**
1721      * Issue a formatted log message with a level of ERROR.
1722      *
1723      * @param t the throwable
1724      * @param format the format string, as per {@link String#format(String, Object...)}
1725      * @param param1 the sole parameter
1726      */

1727     public void errorf(Throwable t, String format, Object param1) {
1728         if (isEnabled(Level.ERROR)) {
1729             doLogf(Level.ERROR, FQCN, format, new Object[] { param1 }, t);
1730         }
1731     }
1732
1733     /**
1734      * Issue a formatted log message with a level of ERROR.
1735      *
1736      * @param t the throwable
1737      * @param format the format string, as per {@link String#format(String, Object...)}
1738      * @param param1 the first parameter
1739      * @param param2 the second parameter
1740      */

1741     public void errorf(Throwable t, String format, Object param1, Object param2) {
1742         if (isEnabled(Level.ERROR)) {
1743             doLogf(Level.ERROR, FQCN, format, new Object[] { param1, param2 }, t);
1744         }
1745     }
1746
1747     /**
1748      * Issue a formatted log message with a level of ERROR.
1749      *
1750      * @param t the throwable
1751      * @param format the format string, as per {@link String#format(String, Object...)}
1752      * @param param1 the first parameter
1753      * @param param2 the second parameter
1754      * @param param3 the third parameter
1755      */

1756     public void errorf(Throwable t, String format, Object param1, Object param2, Object param3) {
1757         if (isEnabled(Level.ERROR)) {
1758             doLogf(Level.ERROR, FQCN, format, new Object[] { param1, param2, param3 }, t);
1759         }
1760     }
1761
1762     /**
1763      * Issue a log message with a level of FATAL.
1764      *
1765      * @param message the message
1766      */

1767     public void fatal(Object message) {
1768         doLog(Level.FATAL, FQCN, message, nullnull);
1769     }
1770
1771     /**
1772      * Issue a log message and throwable with a level of FATAL.
1773      *
1774      * @param message the message
1775      * @param t the throwable
1776      */

1777     public void fatal(Object message, Throwable t) {
1778         doLog(Level.FATAL, FQCN, message, null, t);
1779     }
1780
1781     /**
1782      * Issue a log message and throwable with a level of FATAL and a specific logger class name.
1783      *
1784      * @param loggerFqcn the logger class name
1785      * @param message the message
1786      * @param t the throwable
1787      */

1788     public void fatal(String loggerFqcn, Object message, Throwable t) {
1789         doLog(Level.FATAL, loggerFqcn, message, null, t);
1790     }
1791
1792     /**
1793      * Issue a log message with parameters with a level of FATAL.
1794      *
1795      * @param message the message
1796      * @param params the message parameters
1797      * @deprecated To log a message with parameters, using {@link #fatalv(String, Object...)} is recommended.
1798      */

1799     @Deprecated
1800     public void fatal(Object message, Object[] params) {
1801         doLog(Level.FATAL, FQCN, message, params, null);
1802     }
1803
1804     /**
1805      * Issue a log message with parameters and a throwable with a level of FATAL.
1806      *
1807      * @param message the message
1808      * @param params the message parameters
1809      * @param t the throwable
1810      * @deprecated To log a message with parameters, using {@link #fatalv(Throwable, String, Object...)} is recommended.
1811      */

1812     @Deprecated
1813     public void fatal(Object message, Object[] params, Throwable t) {
1814         doLog(Level.FATAL, FQCN, message, params, t);
1815     }
1816
1817     /**
1818      * Issue a log message with parameters and a throwable with a level of FATAL.
1819      *
1820      * @param loggerFqcn the logger class name
1821      * @param message the message
1822      * @param params the message parameters
1823      * @param t the throwable
1824      */

1825     public void fatal(String loggerFqcn, Object message, Object[] params, Throwable t) {
1826         doLog(Level.FATAL, loggerFqcn, message, params, t);
1827     }
1828
1829     /**
1830      * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
1831      *
1832      * @param format the message format string
1833      * @param params the parameters
1834      */

1835     public void fatalv(String format, Object... params) {
1836         doLog(Level.FATAL, FQCN, format, params, null);
1837     }
1838
1839     /**
1840      * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
1841      *
1842      * @param format the message format string
1843      * @param param1 the sole parameter
1844      */

1845     public void fatalv(String format, Object param1) {
1846         if (isEnabled(Level.FATAL)) {
1847             doLog(Level.FATAL, FQCN, format, new Object[] { param1 }, null);
1848         }
1849     }
1850
1851     /**
1852      * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
1853      *
1854      * @param format the message format string
1855      * @param param1 the first parameter
1856      * @param param2 the second parameter
1857      */

1858     public void fatalv(String format, Object param1, Object param2) {
1859         if (isEnabled(Level.FATAL)) {
1860             doLog(Level.FATAL, FQCN, format, new Object[] { param1, param2 }, null);
1861         }
1862     }
1863
1864     /**
1865      * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
1866      *
1867      * @param format the message format string
1868      * @param param1 the first parameter
1869      * @param param2 the second parameter
1870      * @param param3 the third parameter
1871      */

1872     public void fatalv(String format, Object param1, Object param2, Object param3) {
1873         if (isEnabled(Level.FATAL)) {
1874             doLog(Level.FATAL, FQCN, format, new Object[] { param1, param2, param3 }, null);
1875         }
1876     }
1877
1878     /**
1879      * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
1880      *
1881      * @param t the throwable
1882      * @param format the message format string
1883      * @param params the parameters
1884      */

1885     public void fatalv(Throwable t, String format, Object... params) {
1886         doLog(Level.FATAL, FQCN, format, params, t);
1887     }
1888
1889     /**
1890      * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
1891      *
1892      * @param t the throwable
1893      * @param format the message format string
1894      * @param param1 the sole parameter
1895      */

1896     public void fatalv(Throwable t, String format, Object param1) {
1897         if (isEnabled(Level.FATAL)) {
1898             doLog(Level.FATAL, FQCN, format, new Object[] { param1 }, t);
1899         }
1900     }
1901
1902     /**
1903      * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
1904      *
1905      * @param t the throwable
1906      * @param format the message format string
1907      * @param param1 the first parameter
1908      * @param param2 the second parameter
1909      */

1910     public void fatalv(Throwable t, String format, Object param1, Object param2) {
1911         if (isEnabled(Level.FATAL)) {
1912             doLog(Level.FATAL, FQCN, format, new Object[] { param1, param2 }, t);
1913         }
1914     }
1915
1916     /**
1917      * Issue a log message with a level of FATAL using {@link java.text.MessageFormat}-style formatting.
1918      *
1919      * @param t the throwable
1920      * @param format the message format string
1921      * @param param1 the first parameter
1922      * @param param2 the second parameter
1923      * @param param3 the third parameter
1924      */

1925     public void fatalv(Throwable t, String format, Object param1, Object param2, Object param3) {
1926         if (isEnabled(Level.FATAL)) {
1927             doLog(Level.FATAL, FQCN, format, new Object[] { param1, param2, param3 }, t);
1928         }
1929     }
1930
1931     /**
1932      * Issue a formatted log message with a level of FATAL.
1933      *
1934      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1935      * @param params the parameters
1936      */

1937     public void fatalf(String format, Object... params) {
1938         doLogf(Level.FATAL, FQCN, format, params, null);
1939     }
1940
1941     /**
1942      * Issue a formatted log message with a level of FATAL.
1943      *
1944      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1945      * @param param1 the sole parameter
1946      */

1947     public void fatalf(String format, Object param1) {
1948         if (isEnabled(Level.FATAL)) {
1949             doLogf(Level.FATAL, FQCN, format, new Object[] { param1 }, null);
1950         }
1951     }
1952
1953     /**
1954      * Issue a formatted log message with a level of FATAL.
1955      *
1956      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1957      * @param param1 the first parameter
1958      * @param param2 the second parameter
1959      */

1960     public void fatalf(String format, Object param1, Object param2) {
1961         if (isEnabled(Level.FATAL)) {
1962             doLogf(Level.FATAL, FQCN, format, new Object[] { param1, param2 }, null);
1963         }
1964     }
1965
1966     /**
1967      * Issue a formatted log message with a level of FATAL.
1968      *
1969      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
1970      * @param param1 the first parameter
1971      * @param param2 the second parameter
1972      * @param param3 the third parameter
1973      */

1974     public void fatalf(String format, Object param1, Object param2, Object param3) {
1975         if (isEnabled(Level.FATAL)) {
1976             doLogf(Level.FATAL, FQCN, format, new Object[] { param1, param2, param3 }, null);
1977         }
1978     }
1979
1980     /**
1981      * Issue a formatted log message with a level of FATAL.
1982      *
1983      * @param t the throwable
1984      * @param format the format string, as per {@link String#format(String, Object...)}
1985      * @param params the parameters
1986      */

1987     public void fatalf(Throwable t, String format, Object... params) {
1988         doLogf(Level.FATAL, FQCN, format, params, t);
1989     }
1990
1991     /**
1992      * Issue a formatted log message with a level of FATAL.
1993      *
1994      * @param t the throwable
1995      * @param format the format string, as per {@link String#format(String, Object...)}
1996      * @param param1 the sole parameter
1997      */

1998     public void fatalf(Throwable t, String format, Object param1) {
1999         if (isEnabled(Level.FATAL)) {
2000             doLogf(Level.FATAL, FQCN, format, new Object[] { param1 }, t);
2001         }
2002     }
2003
2004     /**
2005      * Issue a formatted log message with a level of FATAL.
2006      *
2007      * @param t the throwable
2008      * @param format the format string, as per {@link String#format(String, Object...)}
2009      * @param param1 the first parameter
2010      * @param param2 the second parameter
2011      */

2012     public void fatalf(Throwable t, String format, Object param1, Object param2) {
2013         if (isEnabled(Level.FATAL)) {
2014             doLogf(Level.FATAL, FQCN, format, new Object[] { param1, param2 }, t);
2015         }
2016     }
2017
2018     /**
2019      * Issue a formatted log message with a level of FATAL.
2020      *
2021      * @param t the throwable
2022      * @param format the format string, as per {@link String#format(String, Object...)}
2023      * @param param1 the first parameter
2024      * @param param2 the second parameter
2025      * @param param3 the third parameter
2026      */

2027     public void fatalf(Throwable t, String format, Object param1, Object param2, Object param3) {
2028         if (isEnabled(Level.FATAL)) {
2029             doLogf(Level.FATAL, FQCN, format, new Object[] { param1, param2, param3 }, t);
2030         }
2031     }
2032
2033     /**
2034      * Log a message at the given level.
2035      *
2036      * @param level the level
2037      * @param message the message
2038      */

2039     public void log(Level level, Object message) {
2040         doLog(level, FQCN, message, nullnull);
2041     }
2042
2043     /**
2044      * Issue a log message and throwable at the given log level.
2045      *
2046      * @param level the level
2047      * @param message the message
2048      * @param t the throwable
2049      */

2050     public void log(Level level, Object message, Throwable t) {
2051         doLog(level, FQCN, message, null, t);
2052     }
2053
2054     /**
2055      * Issue a log message and throwable at the given log level and a specific logger class name.
2056      *
2057      * @param level the level
2058      * @param loggerFqcn the logger class name
2059      * @param message the message
2060      * @param t the throwable
2061      */

2062     public void log(Level level, String loggerFqcn, Object message, Throwable t) {
2063         doLog(level, loggerFqcn, message, null, t);
2064     }
2065
2066     /**
2067      * Issue a log message with parameters at the given log level.
2068      *
2069      * @param level the level
2070      * @param message the message
2071      * @param params the message parameters
2072      * @deprecated To log a message with parameters, using {@link #logv(Level, String, Object...)} is recommended.
2073      */

2074     @Deprecated
2075     public void log(Level level, Object message, Object[] params) {
2076         doLog(level, FQCN, message, params, null);
2077     }
2078
2079     /**
2080      * Issue a log message with parameters and a throwable at the given log level.
2081      *
2082      * @param level the level
2083      * @param message the message
2084      * @param params the message parameters
2085      * @param t the throwable
2086      * @deprecated To log a message with parameters, using {@link #logv(Level, Throwable, String, Object...)} is recommended.
2087      */

2088     @Deprecated
2089     public void log(Level level, Object message, Object[] params, Throwable t) {
2090         doLog(level, FQCN, message, params, t);
2091     }
2092
2093     /**
2094      * Issue a log message with parameters and a throwable at the given log level.
2095      *
2096      * @param loggerFqcn the logger class name
2097      * @param level the level
2098      * @param message the message
2099      * @param params the message parameters
2100      * @param t the throwable
2101      */

2102     public void log(String loggerFqcn, Level level, Object message, Object[] params, Throwable t) {
2103         doLog(level, loggerFqcn, message, params, t);
2104     }
2105
2106     /**
2107      * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
2108      *
2109      * @param level the level
2110      * @param format the message format string
2111      * @param params the parameters
2112      */

2113     public void logv(Level level, String format, Object... params) {
2114         doLog(level, FQCN, format, params, null);
2115     }
2116
2117     /**
2118      * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
2119      *
2120      * @param level the level
2121      * @param format the message format string
2122      * @param param1 the sole parameter
2123      */

2124     public void logv(Level level, String format, Object param1) {
2125         if (isEnabled(level)) {
2126             doLog(level, FQCN, format, new Object[] { param1 }, null);
2127         }
2128     }
2129
2130     /**
2131      * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
2132      *
2133      * @param level the level
2134      * @param format the message format string
2135      * @param param1 the first parameter
2136      * @param param2 the second parameter
2137      */

2138     public void logv(Level level, String format, Object param1, Object param2) {
2139         if (isEnabled(level)) {
2140             doLog(level, FQCN, format, new Object[] { param1, param2 }, null);
2141         }
2142     }
2143
2144     /**
2145      * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
2146      *
2147      * @param level the level
2148      * @param format the message format string
2149      * @param param1 the first parameter
2150      * @param param2 the second parameter
2151      * @param param3 the third parameter
2152      */

2153     public void logv(Level level, String format, Object param1, Object param2, Object param3) {
2154         if (isEnabled(level)) {
2155             doLog(level, FQCN, format, new Object[] { param1, param2, param3 }, null);
2156         }
2157     }
2158
2159     /**
2160      * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
2161      *
2162      * @param level the level
2163      * @param t the throwable
2164      * @param format the message format string
2165      * @param params the parameters
2166      */

2167     public void logv(Level level, Throwable t, String format, Object... params) {
2168         doLog(level, FQCN, format, params, t);
2169     }
2170
2171     /**
2172      * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
2173      *
2174      * @param level the level
2175      * @param t the throwable
2176      * @param format the message format string
2177      * @param param1 the sole parameter
2178      */

2179     public void logv(Level level, Throwable t, String format, Object param1) {
2180         if (isEnabled(level)) {
2181             doLog(level, FQCN, format, new Object[] { param1 }, t);
2182         }
2183     }
2184
2185     /**
2186      * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
2187      *
2188      * @param level the level
2189      * @param t the throwable
2190      * @param format the message format string
2191      * @param param1 the first parameter
2192      * @param param2 the second parameter
2193      */

2194     public void logv(Level level, Throwable t, String format, Object param1, Object param2) {
2195         if (isEnabled(level)) {
2196             doLog(level, FQCN, format, new Object[] { param1, param2 }, t);
2197         }
2198     }
2199
2200     /**
2201      * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
2202      *
2203      * @param level the level
2204      * @param t the throwable
2205      * @param format the message format string
2206      * @param param1 the first parameter
2207      * @param param2 the second parameter
2208      * @param param3 the third parameter
2209      */

2210     public void logv(Level level, Throwable t, String format, Object param1, Object param2, Object param3) {
2211         if (isEnabled(level)) {
2212             doLog(level, FQCN, format, new Object[] { param1, param2, param3 }, t);
2213         }
2214     }
2215
2216     /**
2217      * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
2218      *
2219      * @param loggerFqcn the logger class name
2220      * @param level the level
2221      * @param t the throwable
2222      * @param format the message format string
2223      * @param params the parameters
2224      */

2225     public void logv(String loggerFqcn, Level level, Throwable t, String format, Object... params) {
2226         doLog(level, loggerFqcn, format, params, t);
2227     }
2228
2229     /**
2230      * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
2231      *
2232      * @param loggerFqcn the logger class name
2233      * @param level the level
2234      * @param t the throwable
2235      * @param format the message format string
2236      * @param param1 the sole parameter
2237      */

2238     public void logv(String loggerFqcn, Level level, Throwable t, String format, Object param1) {
2239         if (isEnabled(level)) {
2240             doLog(level, loggerFqcn, format, new Object[] { param1 }, t);
2241         }
2242     }
2243
2244     /**
2245      * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
2246      *
2247      * @param loggerFqcn the logger class name
2248      * @param level the level
2249      * @param t the throwable
2250      * @param format the message format string
2251      * @param param1 the first parameter
2252      * @param param2 the second parameter
2253      */

2254     public void logv(String loggerFqcn, Level level, Throwable t, String format, Object param1, Object param2) {
2255         if (isEnabled(level)) {
2256             doLog(level, loggerFqcn, format, new Object[] { param1, param2 }, t);
2257         }
2258     }
2259
2260     /**
2261      * Issue a log message at the given log level using {@link java.text.MessageFormat}-style formatting.
2262      *
2263      * @param loggerFqcn the logger class name
2264      * @param level the level
2265      * @param t the throwable
2266      * @param format the message format string
2267      * @param param1 the first parameter
2268      * @param param2 the second parameter
2269      * @param param3 the third parameter
2270      */

2271     public void logv(String loggerFqcn, Level level, Throwable t, String format, Object param1, Object param2, Object param3) {
2272         if (isEnabled(level)) {
2273             doLog(level, loggerFqcn, format, new Object[] { param1, param2, param3 }, t);
2274         }
2275     }
2276
2277     /**
2278      * Issue a formatted log message at the given log level.
2279      *
2280      * @param level the level
2281      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
2282      * @param params the parameters
2283      */

2284     public void logf(Level level, String format, Object... params) {
2285         doLogf(level, FQCN, format, params, null);
2286     }
2287
2288     /**
2289      * Issue a formatted log message at the given log level.
2290      *
2291      * @param level the level
2292      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
2293      * @param param1 the sole parameter
2294      */

2295     public void logf(Level level, String format, Object param1) {
2296         if (isEnabled(level)) {
2297             doLogf(level, FQCN, format, new Object[] { param1 }, null);
2298         }
2299     }
2300
2301     /**
2302      * Issue a formatted log message at the given log level.
2303      *
2304      * @param level the level
2305      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
2306      * @param param1 the first parameter
2307      * @param param2 the second parameter
2308      */

2309     public void logf(Level level, String format, Object param1, Object param2) {
2310         if (isEnabled(level)) {
2311             doLogf(level, FQCN, format, new Object[] { param1, param2 }, null);
2312         }
2313     }
2314
2315     /**
2316      * Issue a formatted log message at the given log level.
2317      *
2318      * @param level the level
2319      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
2320      * @param param1 the first parameter
2321      * @param param2 the second parameter
2322      * @param param3 the third parameter
2323      */

2324     public void logf(Level level, String format, Object param1, Object param2, Object param3) {
2325         if (isEnabled(level)) {
2326             doLogf(level, FQCN, format, new Object[] { param1, param2, param3 }, null);
2327         }
2328     }
2329
2330     /**
2331      * Issue a formatted log message at the given log level.
2332      *
2333      * @param level the level
2334      * @param t the throwable
2335      * @param format the format string, as per {@link String#format(String, Object...)}
2336      * @param params the parameters
2337      */

2338     public void logf(Level level, Throwable t, String format, Object... params) {
2339         doLogf(level, FQCN, format, params, t);
2340     }
2341
2342     /**
2343      * Issue a formatted log message at the given log level.
2344      *
2345      * @param level the level
2346      * @param t the throwable
2347      * @param format the format string, as per {@link String#format(String, Object...)}
2348      * @param param1 the sole parameter
2349      */

2350     public void logf(Level level, Throwable t, String format, Object param1) {
2351         if (isEnabled(level)) {
2352             doLogf(level, FQCN, format, new Object[] { param1 }, t);
2353         }
2354     }
2355
2356     /**
2357      * Issue a formatted log message at the given log level.
2358      *
2359      * @param level the level
2360      * @param t the throwable
2361      * @param format the format string, as per {@link String#format(String, Object...)}
2362      * @param param1 the first parameter
2363      * @param param2 the second parameter
2364      */

2365     public void logf(Level level, Throwable t, String format, Object param1, Object param2) {
2366         if (isEnabled(level)) {
2367             doLogf(level, FQCN, format, new Object[] { param1, param2 }, t);
2368         }
2369     }
2370
2371     /**
2372      * Issue a formatted log message at the given log level.
2373      *
2374      * @param level the level
2375      * @param t the throwable
2376      * @param format the format string, as per {@link String#format(String, Object...)}
2377      * @param param1 the first parameter
2378      * @param param2 the second parameter
2379      * @param param3 the third parameter
2380      */

2381     public void logf(Level level, Throwable t, String format, Object param1, Object param2, Object param3) {
2382         if (isEnabled(level)) {
2383             doLogf(level, FQCN, format, new Object[] { param1, param2, param3 }, t);
2384         }
2385     }
2386
2387     /**
2388      * Log a message at the given level.
2389      *
2390      * @param loggerFqcn the logger class name
2391      * @param level the level
2392      * @param t the throwable cause
2393      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
2394      * @param param1 the sole parameter
2395      */

2396     public void logf(String loggerFqcn, Level level, Throwable t, String format, Object param1) {
2397         if (isEnabled(level)) {
2398             doLogf(level, loggerFqcn, format, new Object[] { param1 }, t);
2399         }
2400     }
2401
2402     /**
2403      * Log a message at the given level.
2404      *
2405      * @param loggerFqcn the logger class name
2406      * @param level the level
2407      * @param t the throwable cause
2408      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
2409      * @param param1 the first parameter
2410      * @param param2 the second parameter
2411      */

2412     public void logf(String loggerFqcn, Level level, Throwable t, String format, Object param1, Object param2) {
2413         if (isEnabled(level)) {
2414             doLogf(level, loggerFqcn, format, new Object[] { param1, param2 }, t);
2415         }
2416     }
2417
2418     /**
2419      * Log a message at the given level.
2420      *
2421      * @param loggerFqcn the logger class name
2422      * @param level the level
2423      * @param t the throwable cause
2424      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
2425      * @param param1 the first parameter
2426      * @param param2 the second parameter
2427      * @param param3 the third parameter
2428      */

2429     public void logf(String loggerFqcn, Level level, Throwable t, String format, Object param1, Object param2, Object param3) {
2430         if (isEnabled(level)) {
2431             doLogf(level, loggerFqcn, format, new Object[] { param1, param2, param3 }, t);
2432         }
2433     }
2434
2435     /**
2436      * Log a message at the given level.
2437      *
2438      * @param loggerFqcn the logger class name
2439      * @param level the level
2440      * @param t the throwable cause
2441      * @param format the format string as per {@link String#format(String, Object...)} or resource bundle key therefor
2442      * @param params the message parameters
2443      */

2444     public void logf(String loggerFqcn, Level level, Throwable t, String format, Object... params) {
2445         doLogf(level, loggerFqcn, format, params, t);
2446     }
2447
2448     /**
2449      * Read resolver; replaces deserialized instance with a canonical instance.
2450      *
2451      * @return the canonical logger instance
2452      */

2453     protected final Object writeReplace() {
2454         return new SerializedLogger(name);
2455     }
2456
2457     /**
2458      * Get a Logger instance given the logger name.
2459      *
2460      * @param name the logger name
2461      *
2462      * @return the logger
2463      */

2464     public static Logger getLogger(String name) {
2465         return LoggerProviders.PROVIDER.getLogger(name);
2466     }
2467
2468     /**
2469      * Get a Logger instance given the logger name with the given suffix.
2470      * <p/>
2471      * <p>This will include a logger separator between logger name and suffix.
2472      *
2473      * @param name the logger name
2474      * @param suffix a suffix to append to the logger name
2475      *
2476      * @return the logger
2477      */

2478     public static Logger getLogger(String name, String suffix) {
2479         return getLogger(name == null || name.length() == 0 ? suffix : name + "." + suffix);
2480     }
2481
2482     /**
2483      * Get a Logger instance given the name of a class. This simply calls create(clazz.getName()).
2484      *
2485      * @param clazz the Class whose name will be used as the logger name
2486      *
2487      * @return the logger
2488      */

2489     public static Logger getLogger(Class<?> clazz) {
2490         return getLogger(clazz.getName());
2491     }
2492
2493     /**
2494      * Get a Logger instance given the name of a class with the given suffix.
2495      * <p/>
2496      * <p>This will include a logger separator between logger name and suffix
2497      *
2498      * @param clazz the Class whose name will be used as the logger name
2499      * @param suffix a suffix to append to the logger name
2500      *
2501      * @return the logger
2502      */

2503     public static Logger getLogger(Class<?> clazz, String suffix) {
2504         return getLogger(clazz.getName(), suffix);
2505     }
2506
2507     /**
2508      * Get a typed logger which implements the given interface.  The current default locale will be used for the new logger.
2509      *
2510      * @param type the interface to implement
2511      * @param category the logger category
2512      * @param <T> the logger type
2513      * @return the typed logger
2514      */

2515     public static <T> T getMessageLogger(Class<T> type, String category) {
2516         return getMessageLogger(type, category, LoggingLocale.getLocale());
2517     }
2518
2519     /**
2520      * Get a typed logger which implements the given interface.  The given locale will be used for the new logger.
2521      *
2522      * @param type the interface to implement
2523      * @param category the logger category
2524      * @param locale the locale for the new logger
2525      * @param <T> the logger type
2526      * @return the typed logger
2527      */

2528     public static <T> T getMessageLogger(final Class<T> type, final String category, final Locale locale) {
2529         if (System.getSecurityManager() == null)
2530             return doGetMessageLogger(type, category, locale);
2531         return doPrivileged(new PrivilegedAction<T>() {
2532             public T run() {
2533                 return doGetMessageLogger(type, category, locale);
2534             }
2535         });
2536     }
2537
2538     private static <T> T doGetMessageLogger(final Class<T> type, final String category, final Locale locale) {
2539         String language = locale.getLanguage();
2540         String country = locale.getCountry();
2541         String variant = locale.getVariant();
2542
2543         Class<? extends T> loggerClass = null;
2544         final ClassLoader classLoader = type.getClassLoader();
2545         final String typeName = type.getName();
2546         if (variant != null && variant.length() > 0) try {
2547             loggerClass = Class.forName(join(typeName, "$logger", language, country, variant), true, classLoader).asSubclass(type);
2548         } catch (ClassNotFoundException e) {
2549             // ignore
2550         }
2551         if (loggerClass == null && country != null && country.length() > 0) try {
2552             loggerClass = Class.forName(join(typeName, "$logger", language, country, null), true, classLoader).asSubclass(type);
2553         } catch (ClassNotFoundException e) {
2554             // ignore
2555         }
2556         if (loggerClass == null && language != null && language.length() > 0) try {
2557             loggerClass = Class.forName(join(typeName, "$logger", language, nullnull), true, classLoader).asSubclass(type);
2558         } catch (ClassNotFoundException e) {
2559             // ignore
2560         }
2561         if (loggerClass == nulltry {
2562             loggerClass = Class.forName(join(typeName, "$logger"nullnullnull), true, classLoader).asSubclass(type);
2563         } catch (ClassNotFoundException e) {
2564             throw new IllegalArgumentException("Invalid logger " + type + " (implementation not found in " + classLoader + ")");
2565         }
2566         final Constructor<? extends T> constructor;
2567         try {
2568             constructor = loggerClass.getConstructor(Logger.class);
2569         } catch (NoSuchMethodException e) {
2570             throw new IllegalArgumentException("Logger implementation " + loggerClass + " has no matching constructor");
2571         }
2572         try {
2573             return constructor.newInstance(Logger.getLogger(category));
2574         } catch (InstantiationException e) {
2575             throw new IllegalArgumentException("Logger implementation " + loggerClass + " could not be instantiated", e);
2576         } catch (IllegalAccessException e) {
2577             throw new IllegalArgumentException("Logger implementation " + loggerClass + " could not be instantiated", e);
2578         } catch (InvocationTargetException e) {
2579             throw new IllegalArgumentException("Logger implementation " + loggerClass + " could not be instantiated", e.getCause());
2580         }
2581     }
2582
2583     private static String join(String interfaceName, String a, String b, String c, String d) {
2584         final StringBuilder build = new StringBuilder();
2585         build.append(interfaceName).append('_').append(a);
2586         if (b != null && b.length() > 0) {
2587             build.append('_');
2588             build.append(b);
2589         }
2590         if (c != null && c.length() > 0) {
2591             build.append('_');
2592             build.append(c);
2593         }
2594         if (d != null && d.length() > 0) {
2595             build.append('_');
2596             build.append(d);
2597         }
2598         return build.toString();
2599     }
2600 }
2601