View Javadoc
1   package org.fax4j.common;
2   
3   /**
4    * This interface defines a simple logger used by the fax4j.<br>
5    * This interface can be implemented to proxy the log requests to another logger framework.
6    *
7    * @author Sagie Gur-Ari
8    * @version 1.01
9    * @since 0.1
10   */
11  public interface Logger {
12      /** The system eol string value */
13      String SYSTEM_EOL = System.getProperty("line.separator", "\n");
14  
15      /**
16       * Sets the minimum log level.
17       *
18       * @param logLevel
19       *            The log level
20       */
21      void setLogLevel(LogLevel logLevel);
22  
23      /**
24       * Returns the minimum log level.
25       *
26       * @return The log level
27       */
28      LogLevel getLogLevel();
29  
30      /**
31       * Logs the provided data at the debug level.
32       *
33       * @param message
34       *            The message parts (may be null)
35       * @param throwable
36       *            The error (may be null)
37       */
38      void logDebug(Object[] message, Throwable throwable);
39  
40      /**
41       * Logs the provided data at the info level.
42       *
43       * @param message
44       *            The message parts (may be null)
45       * @param throwable
46       *            The error (may be null)
47       */
48      void logInfo(Object[] message, Throwable throwable);
49  
50      /**
51       * Logs the provided data at the error level.
52       *
53       * @param message
54       *            The message parts (may be null)
55       * @param throwable
56       *            The error (may be null)
57       */
58      void logError(Object[] message, Throwable throwable);
59  }