1 // Copyright (c) 2000 Just Objects B.V. <just@justobjects.nl>
2 // Distributable under LGPL license. See terms of license at gnu.org.
3 
4 package nl.justobjects.pushlet.util;
5 
6 import nl.justobjects.pushlet.core.ConfigDefs;
7 
8 /**
9  * Logger interface to allow different logging providers.
10 * <p/>
11 *
12 * @author Ulrich Romahn
13 * @version $Id: PushletLogger.java,v 1.1 2007/12/07 12:57:40 justb Exp $
14 */
15public interface PushletLogger extends ConfigDefs {
16
17    /**
18     * Method allowing to initialize our logger
19     */
20    public void init();
21
22    /**
23     * Log message for trace level.
24     *
25     * @param aMessage the message to be logged
26     */
27    public void trace(String aMessage);
28
29    /**
30     * Log message for debug level.
31     *
32     * @param aMessage the message to be logged
33     */
34    public void debug(String aMessage);
35
36    /**
37     * Log message for info level.
38     *
39     * @param aMessage the message to be logged
40     */
41    public void info(String aMessage);
42
43    /**
44     * Log message for warning level.
45     *
46     * @param aMessage the message to be logged
47     */
48    public void warn(String aMessage);
49
50    /**
51     * Log message for warning level with exception.
52     *
53     * @param aMessage   the message to be logged
54     * @param aThrowable the exception
55     */
56    public void warn(String aMessage, Throwable aThrowable);
57
58    /**
59     * Log message for error level.
60     *
61     * @param aMessage the message to be logged
62     */
63    public void error(String aMessage);
64
65    /**
66     * Log message (error level with exception).
67     *
68     * @param aMessage   the message to be logged
69     * @param aThrowable the exception
70     */
71    public void error(String aMessage, Throwable aThrowable);
72
73    /**
74     * Log message for fatal level.
75     *
76     * @param aMessage the message to be logged
77     */
78    public void fatal(String aMessage);
79
80    /**
81     * Log message (fatal level with exception).
82     *
83     * @param aMessage   the message to be logged
84     * @param aThrowable the exception
85     */
86    public void fatal(String aMessage, Throwable aThrowable);
87
88    /**
89     * Set log level
90     *
91     * @param aLevel a valid Level from ConfigDefs
92     */
93    public void setLevel(int aLevel);
94}
95