KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > pentaho > util > logging > ILogger


1 /*
2  * Copyright 2006 Pentaho Corporation. All rights reserved.
3  * This software was developed by Pentaho Corporation and is provided under the terms
4  * of the Mozilla Public License, Version 1.1, or any later version. You may not use
5  * this file except in compliance with the license. If you need a copy of the license,
6  * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
7  * BI Platform. The Initial Developer is Pentaho Corporation.
8  *
9  * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11  * the license for the specific language governing your rights and limitations.
12  *
13  * @created May 3, 2005
14  * @author James Dixon
15  *
16  */

17 package org.pentaho.util.logging;
18
19 /**
20  * The Logger is the main interface into the platform's logging subsystem.
21  * <p>
22  * Note: Documentation taken from <a
23  * HREF="http://logging.apache.org/log4j/docs/api/index.html"
24  * target="_blank">Log4j Javadoc documentation.</a>
25  */

26 public interface ILogger {
27
28     /**
29      * The TRACE has the lowest possible rank and is intended to turn on all
30      * logging.
31      */

32     public static final int TRACE = 1;
33
34     /**
35      * The DEBUG Level designates fine-grained informational events that are
36      * most useful to debug an application.
37      */

38     public static final int DEBUG = 2;
39
40     /**
41      * The INFO level designates informational messages that highlight the
42      * progress of the application at coarse-grained level.
43      */

44     public static final int INFO = 3;
45
46     /**
47      * The WARN level designates potentially harmful situations.
48      */

49     public static final int WARN = 4;
50
51     /**
52      * The ERROR level designates error events that might still allow the
53      * application to continue running.
54      */

55     public static final int ERROR = 5;
56
57     /**
58      * The FATAL level designates very severe error events that will presumably
59      * lead the application to abort.
60      */

61     public static final int FATAL = 6;
62
63     public static final int UNKNOWN = 100;
64
65     public static final String JavaDoc SOLUTION_LOG = "solution"; //$NON-NLS-1$
66

67     public static final String JavaDoc ACTIVITY_LOG = "activity"; //$NON-NLS-1$
68

69     public static final String JavaDoc INSTANCE_LOG = "instance"; //$NON-NLS-1$
70

71     public static final String JavaDoc SESSION_LOG = "session"; //$NON-NLS-1$
72

73     /**
74      * Return the logging level for this Logger.
75      *
76      * @return logging level
77      */

78     public int getLoggingLevel();
79
80     /**
81      * Set the logging level for this Logger.
82      * <p>
83      * Valid logging levels are {@link #TRACE TRACE}, {@link #DEBUG DEBUG},
84      * {@link #INFO INFO}, {@link #WARN WARN}, {@link #ERROR ERROR}, and
85      * {@link #FATAL FATAL}.
86      *
87      * @param loggingLevel
88      */

89     public void setLoggingLevel(int loggingLevel);
90
91     /**
92      * Log a message object with the {@link #TRACE TRACE} Level.
93      *
94      * @param message
95      * the message object to log.
96      */

97     public void trace(String JavaDoc message);
98
99     /**
100      * Log a message object with the {@link #DEBUG DEBUG} Level.
101      *
102      * @param message
103      * the message object to log.
104      */

105     public void debug(String JavaDoc message);
106
107     /**
108      * Log a message object with the {@link #INFO INFO} Level.
109      *
110      * @param message
111      * the message object to log.
112      */

113     public void info(String JavaDoc message);
114
115     /**
116      * Log a message object with the {@link #WARN WARN} Level.
117      *
118      * @param message
119      * the message object to log.
120      */

121     public void warn(String JavaDoc message);
122
123     /**
124      * Log a message object with the {@link #ERROR ERROR} Level.
125      *
126      * @param message
127      * the message object to log.
128      */

129     public void error(String JavaDoc message);
130
131     /**
132      * Log a message object with the {@link #FATAL FATAL} Level.
133      *
134      * @param message
135      * the message object to log.
136      */

137     public void fatal(String JavaDoc message);
138
139     /**
140      * Log a message with the {@link #TRACE TRACE} level including the stack
141      * trace of the Throwable error passed as parameter.
142      *
143      * @param message
144      * the message object to log.
145      * @param error
146      * the exception to log, including its stack trace.
147      */

148     public void trace(String JavaDoc message, Throwable JavaDoc error);
149
150     /**
151      * Log a message with the {@link #DEBUG DEBUG} level including the stack
152      * trace of the Throwable error passed as parameter.
153      *
154      * @param message
155      * the message object to log.
156      * @param error
157      * the exception to log, including its stack trace.
158      */

159     public void debug(String JavaDoc message, Throwable JavaDoc error);
160
161     /**
162      * Log a message with the {@link #INFO INFO} level including the stack trace
163      * of the Throwable error passed as parameter.
164      *
165      * @param message
166      * the message object to log.
167      * @param error
168      * the exception to log, including its stack trace.
169      */

170     public void info(String JavaDoc message, Throwable JavaDoc error);
171
172     /**
173      * Log a message with the {@link #WARN WARN} level including the stack trace
174      * of the Throwable error passed as parameter.
175      *
176      * @param message
177      * the message object to log.
178      * @param error
179      * the exception to log, including its stack trace.
180      */

181     public void warn(String JavaDoc message, Throwable JavaDoc error);
182
183     /**
184      * Log a message with the {@link #ERROR ERROR} level including the stack
185      * trace of the Throwable error passed as parameter.
186      *
187      * @param message
188      * the message object to log.
189      * @param error
190      * the exception to log, including its stack trace.
191      */

192     public void error(String JavaDoc message, Throwable JavaDoc error);
193
194     /**
195      * Log a message with the {@link #FATAL FATAL} level including the stack
196      * trace of the Throwable error passed as parameter.
197      *
198      * @param message
199      * the message object to log.
200      * @param error
201      * the exception to log, including its stack trace.
202      */

203     public void fatal(String JavaDoc message, Throwable JavaDoc error);
204
205 }
Popular Tags