KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > util > monolog > api > BasicLevel


1 /**
2  * Copyright (C) 2001-2003 France Telecom R&D
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18
19 package org.objectweb.util.monolog.api;
20
21 /**
22  * <P>This class predefines a set of levels. Indeed during the instrumentation,
23  * developers must write calls to log an event with a specific level. One of
24  * the goals of Monolog is to be independent of the logging implementation.
25  * To respect this goal, predefined variables or constants are needed. This
26  * class contains only static but not final variables to represent these
27  * predefined levels.</P>
28  *
29  * <P>To respect the flyweight pattern chosen in monolog specification, for each
30  * predefined level, a Level variable and an integer variable are declared.
31  * Their values are not defined, in order to leave it to the implementation to
32  * set them. </P>
33  *
34  * <P>This class defines five basic levels. But it is possible to a MonoLog user to
35  * define additional levels. Monolog allows this type of extension with some
36  * constraints or advices:
37  * <UL>
38  * <LI>If levels are not ordered, the additional levels must be defined by an
39  * implementation of the Level interface.</LI>
40  * <LI>If levels are ordered, all additional level must have an integer value
41  * between the FATAL level and the DEBUG level.</LI>
42  * <LI>If levels are ordered, it is possible to define a level with relative
43  * integer value with an existent level
44  * (MyLevel.FINE = BasicLevel.DEBUG + 2). This possibility imposes that
45  * all MonoLog implementations define a set of sparse integer values for
46  * the levels.</LI>
47  * </UL></P>
48  */

49 public class BasicLevel {
50
51     /**
52      * In general, FATAL messages should describe events that are of
53      * considerable importance and which will prevent continuation of the
54      * program execution. They should be intelligible to end users and to
55      * system administrators
56      */

57     public static int FATAL ;
58     /**
59      * In general, FATAL messages should describe events that are of
60      * considerable importance and which will prevent continuation of the
61      * program execution. They should be intelligible to end users and to
62      * system administrators
63      */

64     public static Level LEVEL_FATAL ;
65
66     /**
67      *The ERROR level designates error events that might still allow the
68      * application to continue running.
69      */

70     public static int ERROR ;
71     /**
72      *The ERROR level designates error events that might still allow the
73      * application to continue running.
74      */

75     public static Level LEVEL_ERROR ;
76
77     /**
78      * In general, WARN messages should describe events that will be of
79      * interest to end users or system managers, or which indicate potential
80      * problems.
81      */

82     public static int WARN ;
83     /**
84      * In general, WARN messages should describe events that will be of
85      * interest to end users or system managers, or which indicate potential
86      * problems.
87      */

88     public static Level LEVEL_WARN ;
89
90     /**
91      * The INFO level designates informational messages that highlight the
92      * progress of the application at a coarse-grained level.
93      */

94     public static int INFO ;
95     /**
96      * The INFO level designates informational messages that highlight the
97      * progress of the application at a coarse-grained level.
98      */

99     public static Level LEVEL_INFO ;
100
101     /**
102      * DEBUG messages might include things like minor (recoverable) failures.
103      * Logging calls for entering, returning, or throwing an exception can be
104      * traced at this level.
105      */

106     public static int DEBUG ;
107     /**
108      * DEBUG messages might include things like minor (recoverable) failures.
109      * Logging calls for entering, returning, or throwing an exception can be
110      * traced at this level.
111      */

112     public static Level LEVEL_DEBUG ;
113
114     /**
115      * This special level indicates that the level is inherited from its
116      * ancestors.
117      */

118     public static int INHERIT ;
119     /**
120      * This special level indicates that the level is inherited from its
121      * ancestors.
122      */

123     public static Level LEVEL_INHERIT ;
124
125 }
126
Popular Tags