KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > xmpp > component > Log


1 /**
2  * $RCSfile: Log.java,v $
3  * $Revision: 1.2 $
4  * $Date: 2005/02/10 20:48:23 $
5  *
6  * Copyright 2004 Jive Software.
7  *
8  * All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */

20
21 package org.xmpp.component;
22
23 /**
24  * A simple logging service for components. Four log levels are provided:<ul>
25  *
26  * <li>Error -- an error occured in the component.
27  * <li>Warn -- a condition occured that an administrator should be warned about.
28  * <li>Info -- used to send information messages, such as a version or license notice.
29  * <li>Debug -- used to send debugging information. Most Log implementations will
30  * disable debug output by default.
31  * </ul>
32  *
33  * Log implementations will attempt use the native logging service of the component host
34  * server. However, this may not be possible in some cases -- for example, when using an
35  * external component that is not currently connected to the server.
36  *
37  * @author Matt Tucker
38  */

39 public interface Log {
40
41     /**
42      * Logs an error.
43      *
44      * @param message the error message.
45      */

46     public void error(String JavaDoc message);
47
48     /**
49      * Logs an error.
50      *
51      * @param message the error message.
52      * @param throwable the Throwable that caused the error.
53      */

54     public void error(String JavaDoc message, Throwable JavaDoc throwable);
55
56     /**
57      * Logs an error.
58      *
59      * @param throwable the Throwable that caused the error.
60      */

61     public void error(Throwable JavaDoc throwable);
62
63     /**
64      * Logs a warning.
65      *
66      * @param message the warning message.
67      */

68     public void warn(String JavaDoc message);
69
70     /**
71      * Logs a warning.
72      *
73      * @param message the warning message.
74      * @param throwable the Throwable that caused the error.
75      */

76     public void warn(String JavaDoc message, Throwable JavaDoc throwable);
77
78     /**
79      * Logs a warning.
80      *
81      * @param throwable the Throwable that caused the error.
82      */

83     public void warn(Throwable JavaDoc throwable);
84
85     /**
86      * Logs an info message.
87      *
88      * @param message the info message.
89      */

90     public void info(String JavaDoc message);
91
92     /**
93      * Logs an info message.
94      *
95      * @param message the info message.
96      * @param throwable the Throwable that caused the info message.
97      */

98     public void info(String JavaDoc message, Throwable JavaDoc throwable);
99
100     /**
101      * Logs an info message.
102      *
103      * @param throwable the Throwable that caused the info message.
104      */

105     public void info(Throwable JavaDoc throwable);
106
107     /**
108      * Logs a debug message.
109      *
110      * @param message the debug message.
111      */

112     public void debug(String JavaDoc message);
113
114     /**
115      * Logs a debug message.
116      *
117      * @param message the debug message.
118      * @param throwable the Throwable that caused the debug message.
119      */

120     public void debug(String JavaDoc message, Throwable JavaDoc throwable);
121
122     /**
123      * Logs a debug message.
124      *
125      * @param throwable the Throwable the caused the debug message.
126      */

127     public void debug(Throwable JavaDoc throwable);
128
129 }
Popular Tags