View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements. See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache license, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License. You may obtain a copy of the License at
8    *
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the license for the specific language governing permissions and
15   * limitations under the license.
16   */
17  package org.apache.logging.log4j;
18  
19  import org.apache.logging.log4j.message.Message;
20  
21  /**
22   * This is the central interface in the log4j package. Most logging
23   * operations, except configuration, are done through this interface.
24   * @doubt See LOG4J2-39.
25   * @doubt See LOG4J2-16.
26   */
27  public interface Logger {
28  
29    /**
30     * Log entry to a method.
31     */
32    void entry();
33  
34    /**
35     * Log entry to a method.
36     * @param params The parameters to the method.
37     * @doubt Use of varargs results in array creation which can be a substantial portion of no-op case.
38     * LogMF/LogSF provides several overrides to avoid vararg except in edge cases. (RG) LogMF
39     * and LogSF implement these in LogXF which calls logger.callAppenders. callAppenders is
40     * part of the implementation and cannot be used by the API. Adding more methods here
41     * and in AbstractLogger is sufficient.
42     */
43    void entry(Object... params);
44  
45    /**
46     * Log exit from a method.
47     */
48    void exit();
49  
50    /**
51     * Log exiting from a method with the result. This may be coded as <br />
52     *     return logger.exit(myResult);
53     * @param result The result being returned from the method call.
54     * @return the result.
55     */
56    <R> R exit(R result);
57  
58    /**
59     * Log an exception or error to be thrown. This may be coded as <br />
60     *    throw logger.throwing(myException);
61     *
62     * @param t The Throwable.
63     * @return the Throwable.
64     */
65    <T extends Throwable> T throwing(T t);
66  
67    /**
68     * Log an exception or error to be thrown. This may be coded as <br />
69     *    throw logger.throwing(debug, myException);
70     * @param level The logging Level.
71     * @param t The Throwable.
72     * @return the Throwable.
73     */
74    <T extends Throwable> T throwing(Level level, T t);
75  
76    /**
77     * Log an exception or error that has been caught.
78     * @param t The Throwable.
79     */
80    void catching(Throwable t);
81  
82    /**
83     * Log an exception or error that has been caught.
84     * @param level The logging Level.
85     * @param t The Throwable.
86     */
87    void catching(Level level, Throwable t);
88  
89    /**
90     * Log a message object with the {@link org.apache.logging.log4j.Level#TRACE TRACE} level.
91     *
92     * @param message the message object to log.
93     */
94    void trace(String message);
95  
96    /**
97     * Log a message object with the {@link org.apache.logging.log4j.Level#TRACE TRACE} level.
98     *
99     * @param marker the marker data specific to this log statement
100    * @param message the message object to log.
101    */
102   void trace(Marker marker, String message);
103 
104   /**
105    * Log a message at the <code>TRACE</code> level including the
106    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
107    * <p/>
108    * <p>
109    * See {@link #debug(String)} form for more detailed information.
110    * </p>
111    *
112    * @param message the message object to log.
113    * @param t       the exception to log, including its stack trace.
114    */
115   void trace(String message, Throwable t);
116 
117   /**
118    * Log a message at the <code>TRACE</code> level including the
119    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
120    * <p/>
121    * <p>
122    * See {@link #debug(String)} form for more detailed information.
123    * </p>
124    *
125    * @param marker the marker data specific to this log statement
126    * @param message the message object to log.
127    * @param t       the exception to log, including its stack trace.
128    */
129   void trace(Marker marker, String message, Throwable t);
130 
131   /**
132    * Log a message object with the {@link org.apache.logging.log4j.Level#TRACE TRACE} level.
133    *
134    * @param message the message object to log.
135    */
136   void trace(Object message);
137 
138   /**
139    * Log a message object with the {@link org.apache.logging.log4j.Level#TRACE TRACE} level.
140    *
141    * @param marker the marker data specific to this log statement
142    * @param message the message object to log.
143    */
144   void trace(Marker marker, Object message);
145 
146   /**
147    * Log a message at the <code>TRACE</code> level including the
148    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
149    * <p/>
150    * <p>
151    * See {@link #debug(String)} form for more detailed information.
152    * </p>
153    *
154    * @param message the message object to log.
155    * @param t       the exception to log, including its stack trace.
156    */
157   void trace(Object message, Throwable t);
158 
159    /**
160    * Log a message at the <code>TRACE</code> level including the
161    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
162    * <p/>
163    * <p>
164    * See {@link #debug(String)} form for more detailed information.
165    * </p>
166    *
167    * @param marker the marker data specific to this log statement
168    * @param message the message object to log.
169    * @param t       the exception to log, including its stack trace.
170    */
171   void trace(Marker marker, Object message, Throwable t);
172 
173   /**
174    * Log a message with parameters at the <code>TRACE</code> level.
175    * @param message the message to log.
176    * @param params parameters to the message.
177    */
178   void trace(String message, Object... params);
179 
180   /**
181    * Log a message with parameters at the <code>TRACE</code> level.
182    *
183    * @param marker the marker data specific to this log statement
184    * @param message the message to log.
185    * @param params parameters to the message.
186    */
187   void trace(Marker marker, String message, Object... params);
188 
189   /**
190    * Check whether this Logger is enabled for the TRACE  Level.
191    *
192    * @return boolean - <code>true</code> if this Logger is enabled for level
193    *         TRACE, <code>false</code> otherwise.
194    */
195   boolean isTraceEnabled();
196 
197   /**
198    * Check whether this Logger is enabled for the TRACE  Level.
199    *
200    * @param marker The marker data specific to this log statement.
201    * @return boolean - <code>true</code> if this Logger is enabled for level
202    *         TRACE, <code>false</code> otherwise.
203    */
204   boolean isTraceEnabled(Marker marker);
205 
206   /**
207    * Log a message with the specific Marker at the TRACE level.
208    *
209    * @param msg the message string to be logged
210    */
211   void trace(Message msg);
212 
213   /**
214    * Log a message with the specific Marker at the TRACE level.
215    *
216    * @param msg the message string to be logged
217    * @param t   A Throwable or null.
218    */
219   void trace(Message msg, Throwable t);
220 
221   /**
222    * Log a message with the specific Marker at the TRACE level.
223    *
224    * @param marker the marker data specific to this log statement
225    * @param msg    the message string to be logged
226    */
227   void trace(Marker marker, Message msg);
228 
229   /**
230    * Log a message with the specific Marker at the TRACE level.
231    *
232    * @param marker the marker data specific to this log statement
233    * @param msg    the message string to be logged
234    * @param t      A Throwable or null.
235    */
236   void trace(Marker marker, Message msg, Throwable t);
237 
238   /**
239    * Log a message object with the {@link org.apache.logging.log4j.Level#DEBUG DEBUG} level.
240    *
241    * @param message the message object to log.
242    */
243   void debug(String message);
244 
245   /**
246    * Log a message object with the {@link org.apache.logging.log4j.Level#DEBUG DEBUG} level.
247    *
248    * @param marker the marker data specific to this log statement
249    * @param message the message object to log.
250    */
251   void debug(Marker marker, String message);
252 
253   /**
254    * Log a message at the <code>DEBUG</code> level including the
255    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
256    *
257    * @param message the message to log.
258    * @param t       the exception to log, including its stack trace.
259    */
260   void debug(String message, Throwable t);
261 
262   /**
263    * Log a message at the <code>DEBUG</code> level including the
264    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
265    *
266    * @param marker the marker data specific to this log statement
267    * @param message the message to log.
268    * @param t       the exception to log, including its stack trace.
269    */
270   void debug(Marker marker, String message, Throwable t);
271 
272   /**
273    * Log a message object with the {@link org.apache.logging.log4j.Level#DEBUG DEBUG} level.
274    *
275    * @param message the message object to log.
276    */
277   void debug(Object message);
278 
279   /**
280    * Log a message object with the {@link org.apache.logging.log4j.Level#DEBUG DEBUG} level.
281    *
282    * @param marker the marker data specific to this log statement
283    * @param message the message object to log.
284    */
285   void debug(Marker marker, Object message);
286 
287   /**
288    * Log a message at the <code>DEBUG</code> level including the
289    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
290    *
291    * @param message the message to log.
292    * @param t       the exception to log, including its stack trace.
293    */
294   void debug(Object message, Throwable t);
295 
296   /**
297    * Log a message at the <code>DEBUG</code> level including the
298    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
299    *
300    * @param marker the marker data specific to this log statement
301    * @param message the message to log.
302    * @param t       the exception to log, including its stack trace.
303    */
304   void debug(Marker marker, Object message, Throwable t);
305 
306   /**
307    * Log a message with parameters at the <code>DEBUG</code> level.
308    * @param message the message to log.
309    * @param params parameters to the message.
310    */
311   void debug(String message, Object... params);
312 
313   /**
314    * Log a message with parameters at the <code>DEBUG</code> level.
315    *
316    * @param marker the marker data specific to this log statement
317    * @param message the message to log.
318    * @param params parameters to the message.
319    */
320   void debug(Marker marker, String message, Object... params);
321 
322   /**
323    * Check whether this Logger is enabled for the DEBUG Level.
324    *
325    * @return boolean - <code>true</code> if this Logger is enabled for level
326    *         DEBUG, <code>false</code> otherwise.
327    */
328   boolean isDebugEnabled();
329 
330   /**
331    * Check whether this Logger is enabled for the DEBUG Level.
332    *
333    * @param marker The marker data specific to this log statement.
334    * @return boolean - <code>true</code> if this Logger is enabled for level
335    *         DEBUG, <code>false</code> otherwise.
336    */
337   boolean isDebugEnabled(Marker marker);
338 
339   /**
340    * Log a message with the specific Marker at the DEBUG level.
341    *
342    * @param msg the message string to be logged
343    */
344   void debug(Message msg);
345 
346   /**
347    * Log a message with the specific Marker at the DEBUG level.
348    *
349    * @param msg the message string to be logged
350    * @param t   A Throwable or null.
351    */
352   void debug(Message msg, Throwable t);
353 
354   /**
355    * Log a message with the specific Marker at the DEBUG level.
356    *
357    * @param marker the marker data specific to this log statement
358    * @param msg    the message string to be logged
359    */
360   void debug(Marker marker, Message msg);
361 
362   /**
363    * Log a message with the specific Marker at the DEBUG level.
364    *
365    * @param marker the marker data specific to this log statement
366    * @param msg    the message string to be logged
367    * @param t      A Throwable or null.
368    */
369   void debug(Marker marker, Message msg, Throwable t);
370 
371   /**
372    * Log a message object with the {@link org.apache.logging.log4j.Level#INFO INFO} level.
373    *
374    * @param message the message object to log.
375    */
376   void info(String message);
377 
378   /**
379    * Log a message object with the {@link org.apache.logging.log4j.Level#INFO INFO} level.
380    *
381    * @param marker the marker data specific to this log statement
382    * @param message the message object to log.
383    */
384   void info(Marker marker, String message);
385 
386   /**
387    * Log a message at the <code>INFO</code> level including the
388    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
389    *
390    * @param message the message object to log.
391    * @param t       the exception to log, including its stack trace.
392    */
393   void info(String message, Throwable t);
394 
395   /**
396    * Log a message at the <code>INFO</code> level including the
397    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
398    *
399    * @param marker the marker data specific to this log statement
400    * @param message the message object to log.
401    * @param t       the exception to log, including its stack trace.
402    */
403   void info(Marker marker, String message, Throwable t);
404 
405   /**
406    * Log a message object with the {@link org.apache.logging.log4j.Level#INFO INFO} level.
407    *
408    * @param message the message object to log.
409    */
410   void info(Object message);
411 
412   /**
413    * Log a message object with the {@link org.apache.logging.log4j.Level#INFO INFO} level.
414    *
415    * @param marker the marker data specific to this log statement
416    * @param message the message object to log.
417    */
418   void info(Marker marker, Object message);
419 
420   /**
421    * Log a message at the <code>INFO</code> level including the
422    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
423    *
424    * @param message the message object to log.
425    * @param t       the exception to log, including its stack trace.
426    */
427   void info(Object message, Throwable t);
428 
429   /**
430    * Log a message at the <code>INFO</code> level including the
431    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
432    *
433    * @param marker the marker data specific to this log statement
434    * @param message the message object to log.
435    * @param t       the exception to log, including its stack trace.
436    */
437   void info(Marker marker, Object message, Throwable t);
438 
439   /**
440    * Log a message with parameters at the <code>INFO</code> level.
441    *
442    * @param message the message to log.
443    * @param params parameters to the message.
444    *
445    * @doubt Likely to misinterpret existing log4j client code that intended to call
446    * info(Object,Throwable). Incurs array creation expense on every call. (RG) It isn't
447    * possible to be misinterpreted as the previous method is for that signature. Methods
448    * should be added to avoid varargs for 1, 2 or 3 parameters.
449    */
450   void info(String message, Object... params);
451 
452   /**
453    * Log a message with parameters at the <code>INFO</code> level.
454    *
455    * @param marker the marker data specific to this log statement
456    * @param message the message to log.
457    * @param params parameters to the message.
458    *
459    * @doubt Likely to misinterpret existing log4j client code that intended to call
460    * info(Object,Throwable). Incurs array creation expense on every call. (RG) It isn't
461    * possible to be misinterpreted as the previous method is for that signature. Methods
462    * should be added to avoid varargs for 1, 2 or 3 parameters.
463    */
464   void info(Marker marker, String message, Object... params);
465   /**
466    * Check whether this Logger is enabled for the INFO Level.
467    *
468    * @return boolean - <code>true</code> if this Logger is enabled for level
469    *         INFO, <code>false</code> otherwise.
470    */
471   boolean isInfoEnabled();
472 
473   /**
474    * Check whether this Logger is enabled for the INFO Level.
475    *
476    * @param marker The marker data specific to this log statement.
477    * @return boolean - <code>true</code> if this Logger is enabled for level
478    *         INFO, <code>false</code> otherwise.
479    */
480   boolean isInfoEnabled(Marker marker);
481 
482   /**
483    * Log a message with the specific Marker at the TRACE level.
484    *
485    * @param msg the message string to be logged
486    */
487   void info(Message msg);
488 
489   /**
490    * Log a message with the specific Marker at the INFO level.
491    *
492    * @param msg the message string to be logged
493    * @param t   A Throwable or null.
494    */
495   void info(Message msg, Throwable t);
496 
497   /**
498    * Log a message with the specific Marker at the INFO level.
499    *
500    * @param marker the marker data specific to this log statement
501    * @param msg    the message string to be logged
502    */
503   void info(Marker marker, Message msg);
504 
505   /**
506    * Log a message with the specific Marker at the INFO level.
507    *
508    * @param marker the marker data specific to this log statement
509    * @param msg    the message string to be logged
510    * @param t      A Throwable or null.
511    */
512   void info(Marker marker, Message msg, Throwable t);
513 
514   /**
515    * Log a message object with the {@link org.apache.logging.log4j.Level#WARN WARN} level.
516    *
517    * @param message the message object to log.
518    */
519   void warn(String message);
520 
521   /**
522    * Log a message object with the {@link org.apache.logging.log4j.Level#WARN WARN} level.
523    *
524    * @param marker the marker data specific to this log statement
525    * @param message the message object to log.
526    */
527   void warn(Marker marker, String message);
528 
529   /**
530    * Log a message at the <code>WARN</code> level including the
531    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
532    *
533    * @param message the message object to log.
534    * @param t       the exception to log, including its stack trace.
535    */
536   void warn(String message, Throwable t);
537 
538   /**
539    * Log a message at the <code>WARN</code> level including the
540    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
541    *
542    * @param marker the marker data specific to this log statement
543    * @param message the message object to log.
544    * @param t       the exception to log, including its stack trace.
545    */
546   void warn(Marker marker, String message, Throwable t);
547 
548  /**
549    * Log a message object with the {@link org.apache.logging.log4j.Level#WARN WARN} level.
550    *
551    * @param message the message object to log.
552    */
553   void warn(Object message);
554 
555   /**
556    * Log a message object with the {@link org.apache.logging.log4j.Level#WARN WARN} level.
557    *
558    * @param marker the marker data specific to this log statement
559    * @param message the message object to log.
560    */
561   void warn(Marker marker, Object message);
562 
563   /**
564    * Log a message at the <code>WARN</code> level including the
565    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
566    *
567    * @param message the message object to log.
568    * @param t       the exception to log, including its stack trace.
569    */
570   void warn(Object message, Throwable t);
571 
572   /**
573    * Log a message at the <code>WARN</code> level including the
574    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
575    *
576    * @param marker the marker data specific to this log statement
577    * @param message the message object to log.
578    * @param t       the exception to log, including its stack trace.
579    */
580   void warn(Marker marker, Object message, Throwable t);
581 
582   /**
583    * Log a message with parameters at the <code>WARN</code> level.
584    * @param message the message to log.
585    * @param params parameters to the message.
586    * @doubt Likely to misinterpret existing log4j client code that intended to call
587    * info(Object,Throwable). Incurs array creation expense on every call. (RG) I assume you
588    * meant warn, not info. It isn't possible to be misinterpreted as the previous method
589    * is for that signature.Methods should be added to avoid varargs for 1, 2 or 3 parameters.
590    */
591   void warn(String message, Object... params);
592 
593   /**
594    * Log a message with parameters at the <code>WARN</code> level.
595    *
596    * @param marker the marker data specific to this log statement.
597    * @param message the message to log.
598    * @param params parameters to the message.
599    *
600    * @doubt Likely to misinterpret existing log4j client code that intended to call
601    * info(Object,Throwable). Incurs array creation expense on every call. (RG) I assume you
602    * meant warn, not info. It isn't possible to be misinterpreted as the previous method
603    * is for that signature.Methods should be added to avoid varargs for 1, 2 or 3 parameters.
604    */
605   void warn(Marker marker, String message, Object... params);
606 
607   /**
608    * Check whether this Logger is enabled for the WARN Level.
609    *
610    * @return boolean - <code>true</code> if this Logger is enabled for level
611    *         WARN, <code>false</code> otherwise.
612    */
613   boolean isWarnEnabled();
614 
615   /**
616    * Check whether this Logger is enabled for the WARN Level.
617    *
618    * @param marker The marker data specific to this log statement.
619    * @return boolean - <code>true</code> if this Logger is enabled for level
620    *         WARN, <code>false</code> otherwise.
621    */
622   boolean isWarnEnabled(Marker marker);
623 
624   /**
625    * Log a message with the specific Marker at the WARN level.
626    *
627    * @param msg the message string to be logged
628    */
629   void warn(Message msg);
630 
631   /**
632    * Log a message with the specific Marker at the WARN level.
633    *
634    * @param msg the message string to be logged
635    * @param t   A Throwable or null.
636    */
637   void warn(Message msg, Throwable t);
638 
639   /**
640    * Log a message with the specific Marker at the WARN level.
641    *
642    * @param marker the marker data specific to this log statement
643    * @param msg    the message string to be logged
644    */
645   void warn(Marker marker, Message msg);
646 
647   /**
648    * Log a message with the specific Marker at the WARN level.
649    *
650    * @param marker the marker data specific to this log statement
651    * @param msg    the message string to be logged
652    * @param t      A Throwable or null.
653    */
654   void warn(Marker marker, Message msg, Throwable t);
655 
656   /**
657    * Log a message object with the {@link org.apache.logging.log4j.Level#ERROR ERROR} level.
658    *
659    * @param message the message object to log.
660    */
661   void error(String message);
662 
663   /**
664    * Log a message object with the {@link org.apache.logging.log4j.Level#ERROR ERROR} level.
665    *
666    * @param marker the marker data specific to this log statement.
667    * @param message the message object to log.
668    */
669   void error(Marker marker, String message);
670 
671   /**
672    * Log a message at the <code>ERROR</code> level including the
673    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
674    *
675    * @param message the message object to log.
676    * @param t       the exception to log, including its stack trace.
677    */
678   void error(String message, Throwable t);
679 
680   /**
681    * Log a message at the <code>ERROR</code> level including the
682    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
683    *
684    * @param marker the marker data specific to this log statement.
685    * @param message the message object to log.
686    * @param t       the exception to log, including its stack trace.
687    */
688   void error(Marker marker, String message, Throwable t);
689 
690   /**
691    * Log a message object with the {@link org.apache.logging.log4j.Level#ERROR ERROR} level.
692    *
693    * @param message the message object to log.
694    */
695   void error(Object message);
696 
697   /**
698    * Log a message object with the {@link org.apache.logging.log4j.Level#ERROR ERROR} level.
699    *
700    * @param marker the marker data specific to this log statement.
701    * @param message the message object to log.
702    */
703   void error(Marker marker, Object message);
704 
705   /**
706    * Log a message at the <code>ERROR</code> level including the
707    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
708    *
709    * @param message the message object to log.
710    * @param t       the exception to log, including its stack trace.
711    */
712   void error(Object message, Throwable t);
713 
714   /**
715    * Log a message at the <code>ERROR</code> level including the
716    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
717    *
718    * @param marker the marker data specific to this log statement.
719    * @param message the message object to log.
720    * @param t       the exception to log, including its stack trace.
721    */
722   void error(Marker marker, Object message, Throwable t);
723 
724   /**
725    * Log a message with parameters at the <code>ERROR</code> level.
726    *
727    * @param message the message to log.
728    * @param params parameters to the message.
729    *
730    * @doubt Likely to misinterpret existing log4j client code that intended to call
731    * info(Object,Throwable). Incurs array creation expense on every call. (RG) I assume you
732    * meant error, not info. It isn't possible to be misinterpreted as the previous method
733    * is for that signature. Methods should be added to avoid varargs for 1, 2 or 3 parameters.
734    */
735   void error(String message, Object... params);
736 
737   /**
738    * Log a message with parameters at the <code>ERROR</code> level.
739    * @param marker the marker data specific to this log statement.
740    * @param message the message to log.
741    * @param params parameters to the message.
742    *
743    * @doubt Likely to misinterpret existing log4j client code that intended to call
744    * info(Object,Throwable). Incurs array creation expense on every call. (RG) I assume you
745    * meant error, not info. It isn't possible to be misinterpreted as the previous method
746    * is for that signature. Methods should be added to avoid varargs for 1, 2 or 3 parameters.
747    */
748   void error(Marker marker, String message, Object... params);
749 
750   /**
751    * Check whether this Logger is enabled for the ERROR Level.
752    *
753    * @return boolean - <code>true</code> if this Logger is enabled for level
754    *         ERROR, <code>false</code> otherwise.
755    */
756   boolean isErrorEnabled();
757 
758   /**
759    * Check whether this Logger is enabled for the ERROR Level.
760    *
761    * @param marker The marker data specific to this log statement.
762    * @return boolean - <code>true</code> if this Logger is enabled for level
763    *         ERROR, <code>false</code> otherwise.
764    */
765   boolean isErrorEnabled(Marker marker);
766 
767   /**
768    * Log a message with the specific Marker at the ERROR level.
769    *
770    * @param msg the message string to be logged
771    */
772   void error(Message msg);
773 
774   /**
775    * Log a message with the specific Marker at the ERROR level.
776    *
777    * @param msg the message string to be logged
778    * @param t   A Throwable or null.
779    */
780   void error(Message msg, Throwable t);
781 
782   /**
783    * Log a message with the specific Marker at the ERROR level.
784    *
785    * @param marker the marker data specific to this log statement
786    * @param msg    the message string to be logged
787    */
788   void error(Marker marker, Message msg);
789 
790   /**
791    * Log a message with the specific Marker at the ERROR level.
792    *
793    * @param marker the marker data specific to this log statement
794    * @param msg    the message string to be logged
795    * @param t      A Throwable or null.
796    */
797   void error(Marker marker, Message msg, Throwable t);
798 
799   /**
800    * Log a message object with the {@link org.apache.logging.log4j.Level#FATAL FATAL} level.
801    *
802    * @param message the message object to log.
803    */
804   void fatal(String message);
805 
806   /**
807    * Log a message object with the {@link org.apache.logging.log4j.Level#FATAL FATAL} level.
808    *
809    * @param marker The marker data specific to this log statement.
810    * @param message the message object to log.
811    */
812   void fatal(Marker marker, String message);
813 
814   /**
815    * Log a message at the <code>FATAL</code> level including the
816    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
817    *
818    * @param message the message object to log.
819    * @param t       the exception to log, including its stack trace.
820    */
821   void fatal(String message, Throwable t);
822 
823 
824   /**
825    * Log a message at the <code>FATAL</code> level including the
826    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
827    *
828    * @param marker The marker data specific to this log statement.
829    * @param message the message object to log.
830    * @param t       the exception to log, including its stack trace.
831    */
832   void fatal(Marker marker, String message, Throwable t);
833 
834   /**
835    * Log a message object with the {@link org.apache.logging.log4j.Level#FATAL FATAL} level.
836    *
837    * @param message the message object to log.
838    */
839   void fatal(Object message);
840 
841   /**
842    * Log a message object with the {@link org.apache.logging.log4j.Level#FATAL FATAL} level.
843    *
844    * @param marker The marker data specific to this log statement.
845    * @param message the message object to log.
846    */
847   void fatal(Marker marker, Object message);
848 
849   /**
850    * Log a message at the <code>FATAL</code> level including the
851    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
852    *
853    * @param message the message object to log.
854    * @param t       the exception to log, including its stack trace.
855    */
856   void fatal(Object message, Throwable t);
857 
858   /**
859    * Log a message at the <code>FATAL</code> level including the
860    * stack trace of the {@link Throwable}<code>t</code> passed as parameter.
861    *
862    * @param marker The marker data specific to this log statement.
863    * @param message the message object to log.
864    * @param t       the exception to log, including its stack trace.
865    */
866   void fatal(Marker marker, Object message, Throwable t);
867 
868   /**
869    * Log a message with parameters at the <code>FATAL</code> level.
870    *
871    *
872    * @param message the message to log.
873    * @param params parameters to the message.
874    *
875    * @doubt Likely to misinterpret existing log4j client code that intended to call
876    * info(Object,Throwable). Incurs array creation expense on every call.(RG) I assume you
877    * meant fatal, not info. It isn't possible to be misinterpreted as the previous method
878    * is for that signature. Methods should be added to avoid varargs for 1, 2 or 3 parameters.
879    */
880   void fatal(String message, Object... params);
881 
882   /**
883    * Log a message with parameters at the <code>FATAL</code> level.
884    *
885    * @param marker The marker data specific to this log statement.
886    * @param message the message to log.
887    * @param params parameters to the message.
888    *
889    * @doubt Likely to misinterpret existing log4j client code that intended to call
890    * info(Object,Throwable). Incurs array creation expense on every call.(RG) I assume you
891    * meant fatal, not info. It isn't possible to be misinterpreted as the previous method
892    * is for that signature. Methods should be added to avoid varargs for 1, 2 or 3 parameters.
893    */
894   void fatal(Marker marker, String message, Object... params);
895 
896   /**
897    * Check whether this Logger is enabled for the FATAL Level.
898    *
899    * @return boolean - <code>true</code> if this Logger is enabled for level
900    *         FATAL, <code>false</code> otherwise.
901    */
902   boolean isFatalEnabled();
903 
904   /**
905    * Check whether this Logger is enabled for the FATAL Level.
906    *
907    * @param marker The marker data specific to this log statement.
908    * @return boolean - <code>true</code> if this Logger is enabled for level
909    *         FATAL, <code>false</code> otherwise.
910    */
911   boolean isFatalEnabled(Marker marker);
912 
913   /**
914    * Log a message with the specific Marker at the FATAL level.
915    *
916    * @param msg the message string to be logged
917    */
918   void fatal(Message msg);
919 
920   /**
921    * Log a message with the specific Marker at the FATAL level.
922    *
923    * @param msg the message string to be logged
924    * @param t   A Throwable or null.
925    */
926   void fatal(Message msg, Throwable t);
927 
928   /**
929    * Log a message with the specific Marker at the FATAL level.
930    *
931    * @param marker the marker data specific to this log statement
932    * @param msg    the message string to be logged
933    */
934   void fatal(Marker marker, Message msg);
935 
936   /**
937    * Log a message with the specific Marker at the FATAL level.
938    *
939    * @param marker the marker data specific to this log statement
940    * @param msg    the message string to be logged
941    * @param t      A Throwable or null.
942    */
943   void fatal(Marker marker, Message msg, Throwable t);
944 }