View Javadoc

1   /*
2    *  Copyright (c) 2005, 2006, 2007 Imola Informatica.
3    *  All rights reserved. This program and the accompanying materials
4    *  are made available under the terms of the LGPL License v2.1
5    *  which accompanies this distribution, and is available at
6    *  http://www.gnu.org/licenses/lgpl.html
7    */
8   
9   
10  package it.imolinfo.jbi4ejb;
11  
12  /**
13   * The main user interface to logging. It is expected that logging takes place
14   * through concrete implementations of this interface.
15   * <p>
16   *
17   * @author <a href="mailto:mcimatti@imolinfo.it">Marco Cimatti</a>
18   */
19  public interface Logger extends org.slf4j.Logger {
20  
21      /**
22       * Log an exception (throwable) at level DEBUG with an accompanying message
23       * according to the specified format and arguments.
24       * <p>
25       * This form avoids superfluous object creation when the logger is disabled
26       * for the DEBUG level.
27       * </p>
28       *
29       * @param  format  the format string.
30       * @param  args    the arguments.
31       * @param  t       the exception (throwable) to log.
32       */
33      void debug(String format, Object[] args, Throwable t);
34  
35      /**
36       * Log an exception (throwable) at level INFO with an accompanying message
37       * according to the specified format and arguments.
38       * <p>
39       * This form avoids superfluous object creation when the logger is disabled
40       * for the INFO level.
41       * </p>
42       *
43       * @param  format  the format string.
44       * @param  args    the arguments.
45       * @param  t       the exception (throwable) to log.
46       */
47      void info(String format, Object[] args, Throwable t);
48  
49      /**
50       * Log an exception (throwable) at level WARN with an accompanying message
51       * according to the specified format and arguments.
52       * <p>
53       * This form avoids superfluous object creation when the logger is disabled
54       * for the WARN level.
55       * </p>
56       *
57       * @param  format  the format string.
58       * @param  args    the arguments.
59       * @param  t       the exception (throwable) to log.
60       */
61      void warn(String format, Object[] args, Throwable t);
62  
63      /**
64       * Log an exception (throwable) at level ERROR with an accompanying message
65       * according to the specified format and arguments.
66       * <p>
67       * This form avoids superfluous object creation when the logger is disabled
68       * for the ERROR level.
69       * </p>
70       *
71       * @param  format  the format string.
72       * @param  args    the arguments.
73       * @param  t       the exception (throwable) to log.
74       */
75      void error(String format, Object[] args, Throwable t);
76  }