Package org.apache.log4j
Class Level
java.lang.Object
org.apache.log4j.Priority
org.apache.log4j.Level
- All Implemented Interfaces:
Serializable
Defines the minimum set of levels recognized by the system, that is
OFF
, FATAL
, ERROR
,
WARN
, INFO
, DEBUG
and
ALL
.
The Level
class may be subclassed to define a larger
level set.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Level
TheALL
has the lowest possible rank and is intended to turn on all logging.static final Level
TheDEBUG
Level designates fine-grained informational events that are most useful to debug an application.static final Level
TheERROR
level designates error events that might still allow the application to continue running.static final Level
TheFATAL
level designates very severe error events that will presumably lead the application to abort.static final Level
TheINFO
level designates informational messages that highlight the progress of the application at coarse-grained level.static final Level
TheOFF
has the highest possible rank and is intended to turn off logging.(package private) static final long
Serialization version id.static final Level
TheTRACE
Level designates finer-grained informational events than theDEBUG</code level.
static final int
TRACE level integer value.static final Level
TheWARN
level designates potentially harmful situations.static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
Custom deserialization of Level.private Object
Resolved deserialized level to one of the stock instances.static Level
toLevel
(int val) Convert an integer passed as argument to a level.static Level
Convert an integer passed as argument to a level.static Level
Convert the string passed as argument to a level.static Level
Convert the string passed as argument to a level.private void
Serialize level.Methods inherited from class org.apache.log4j.Priority
equals, getAllPossiblePriorities, getSyslogEquivalent, isGreaterOrEqual, toInt, toPriority, toPriority, toPriority, toPriority, toString
-
Field Details
-
TRACE_INT
public static final int TRACE_INTTRACE level integer value.- Since:
- 1.2.12
- See Also:
-
X_TRACE_INT
public static final int X_TRACE_INT- See Also:
-
OFF
TheOFF
has the highest possible rank and is intended to turn off logging. -
FATAL
TheFATAL
level designates very severe error events that will presumably lead the application to abort. -
ERROR
TheERROR
level designates error events that might still allow the application to continue running. -
WARN
TheWARN
level designates potentially harmful situations. -
INFO
TheINFO
level designates informational messages that highlight the progress of the application at coarse-grained level. -
DEBUG
TheDEBUG
Level designates fine-grained informational events that are most useful to debug an application. -
TRACE
TheTRACE
Level designates finer-grained informational events than theDEBUG</code level.
- Since:
- 1.2.12
-
ALL
TheALL
has the lowest possible rank and is intended to turn on all logging. -
serialVersionUID
static final long serialVersionUIDSerialization version id.- See Also:
-
-
Constructor Details
-
Level
Instantiate a Level object.
-
-
Method Details
-
toLevel
Convert the string passed as argument to a level. If the conversion fails, then this method returnsDEBUG
. -
toLevel
Convert an integer passed as argument to a level. If the conversion fails, then this method returnsDEBUG
. -
toLevel
Convert an integer passed as argument to a level. If the conversion fails, then this method returns the specified default. -
toLevel
Convert the string passed as argument to a level. If the conversion fails, then this method returns the value ofdefaultLevel
. -
readObject
Custom deserialization of Level.- Parameters:
s
- serialization stream.- Throws:
IOException
- if IO exception.ClassNotFoundException
- if class not found.
-
writeObject
Serialize level.- Parameters:
s
- serialization stream.- Throws:
IOException
- if exception during serialization.
-
readResolve
Resolved deserialized level to one of the stock instances. May be overridden in classes derived from Level.- Returns:
- resolved object.
- Throws:
ObjectStreamException
- if exception during resolution.
-