KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mysql > jdbc > log > Log


1 /*
2  Copyright (C) 2002-2004 MySQL AB
3
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of version 2 of the GNU General Public License as
6  published by the Free Software Foundation.
7
8  There are special exceptions to the terms and conditions of the GPL
9  as it is applied to this software. View the full text of the
10  exception in file EXCEPTIONS-CONNECTOR-J in the directory of this
11  software distribution.
12
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
22
23
24  */

25 package com.mysql.jdbc.log;
26
27 /**
28  * Unified interface to logging facilities on different platforms
29  *
30  * @author Mark Matthews
31  *
32  * @version $Id: Log.java,v 1.1.2.2 2005/05/19 15:52:24 mmatthews Exp $
33  */

34 public interface Log {
35     /**
36      * Is the 'debug' log level enabled?
37      *
38      * @return true if so.
39      */

40     boolean isDebugEnabled();
41
42     /**
43      * Is the 'error' log level enabled?
44      *
45      * @return true if so.
46      */

47     boolean isErrorEnabled();
48
49     /**
50      * Is the 'fatal' log level enabled?
51      *
52      * @return true if so.
53      */

54     boolean isFatalEnabled();
55
56     /**
57      * Is the 'info' log level enabled?
58      *
59      * @return true if so.
60      */

61     boolean isInfoEnabled();
62
63     /**
64      * Is the 'trace' log level enabled?
65      *
66      * @return true if so.
67      */

68     boolean isTraceEnabled();
69
70     /**
71      * Is the 'warn' log level enabled?
72      *
73      * @return true if so.
74      */

75     boolean isWarnEnabled();
76
77     /**
78      * Logs the given message instance using the 'debug' level
79      *
80      * @param msg
81      * the message to log
82      */

83     void logDebug(Object JavaDoc msg);
84
85     /**
86      * Logs the given message and Throwable at the 'debug' level.
87      *
88      * @param msg
89      * the message to log
90      * @param thrown
91      * the throwable to log (may be null)
92      */

93     void logDebug(Object JavaDoc msg, Throwable JavaDoc thrown);
94
95     /**
96      * Logs the given message instance using the 'error' level
97      *
98      * @param msg
99      * the message to log
100      */

101     void logError(Object JavaDoc msg);
102
103     /**
104      * Logs the given message and Throwable at the 'error' level.
105      *
106      * @param msg
107      * the message to log
108      * @param thrown
109      * the throwable to log (may be null)
110      */

111     void logError(Object JavaDoc msg, Throwable JavaDoc thrown);
112
113     /**
114      * Logs the given message instance using the 'fatal' level
115      *
116      * @param msg
117      * the message to log
118      */

119     void logFatal(Object JavaDoc msg);
120
121     /**
122      * Logs the given message and Throwable at the 'fatal' level.
123      *
124      * @param msg
125      * the message to log
126      * @param thrown
127      * the throwable to log (may be null)
128      */

129     void logFatal(Object JavaDoc msg, Throwable JavaDoc thrown);
130
131     /**
132      * Logs the given message instance using the 'info' level
133      *
134      * @param msg
135      * the message to log
136      */

137     void logInfo(Object JavaDoc msg);
138
139     /**
140      * Logs the given message and Throwable at the 'info' level.
141      *
142      * @param msg
143      * the message to log
144      * @param thrown
145      * the throwable to log (may be null)
146      */

147     void logInfo(Object JavaDoc msg, Throwable JavaDoc thrown);
148
149     /**
150      * Logs the given message instance using the 'trace' level
151      *
152      * @param msg
153      * the message to log
154      */

155     void logTrace(Object JavaDoc msg);
156
157     /**
158      * Logs the given message and Throwable at the 'trace' level.
159      *
160      * @param msg
161      * the message to log
162      * @param thrown
163      * the throwable to log (may be null)
164      */

165     void logTrace(Object JavaDoc msg, Throwable JavaDoc thrown);
166
167     /**
168      * Logs the given message instance using the 'warn' level
169      *
170      * @param msg
171      * the message to log
172      */

173     void logWarn(Object JavaDoc msg);
174
175     /**
176      * Logs the given message and Throwable at the 'warn' level.
177      *
178      * @param msg
179      * the message to log
180      * @param thrown
181      * the throwable to log (may be null)
182      */

183     void logWarn(Object JavaDoc msg, Throwable JavaDoc thrown);
184 }
Popular Tags