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.
- Author:
- Ceki Gülcü
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final LevelTheALLhas the lowest possible rank and is intended to turn on all logging.static final LevelTheDEBUGLevel designates fine-grained informational events that are most useful to debug an application.static final LevelTheERRORlevel designates error events that might still allow the application to continue running.static final LevelTheFATALlevel designates very severe error events that will presumably lead the application to abort.static final LevelTheINFOlevel designates informational messages that highlight the progress of the application at coarse-grained level.static final LevelTheOFFhas the highest possible rank and is intended to turn off logging.static final LevelTheTRACELevel designates finer-grained informational events than theDEBUGlevel.static final intTRACE level integer value.static final LevelTheWARNlevel designates potentially harmful situations.static final int
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic LeveltoLevel(int val) Convert an integer passed as argument to a level.static LevelConvert an integer passed as argument to a level.static LevelConvert the string passed as argument to a level.static LevelConvert the string passed as argument to a level.Methods inherited from class org.apache.log4j.Priorityequals, getAllPossiblePriorities, getSyslogEquivalent, isGreaterOrEqual, toInt, toPriority, toPriority, toPriority, toPriority, toString
- 
Field Details- 
TRACE_INTTRACE level integer value.- Since:
- 1.2.12
- See Also:
 
- 
X_TRACE_INT- See Also:
 
- 
OFFTheOFFhas the highest possible rank and is intended to turn off logging.
- 
FATALTheFATALlevel designates very severe error events that will presumably lead the application to abort.
- 
ERRORTheERRORlevel designates error events that might still allow the application to continue running.
- 
WARNTheWARNlevel designates potentially harmful situations.
- 
INFOTheINFOlevel designates informational messages that highlight the progress of the application at coarse-grained level.
- 
DEBUGTheDEBUGLevel designates fine-grained informational events that are most useful to debug an application.
- 
TRACETheTRACELevel designates finer-grained informational events than theDEBUGlevel.- Since:
- 1.2.12
 
- 
ALLTheALLhas the lowest possible rank and is intended to turn on all logging.
 
- 
- 
Constructor Details- 
LevelInstantiate a Level object.- Parameters:
- level- a level
- levelStr- a level string
- syslogEquivalent- the Syslog equivalent
 
 
- 
- 
Method Details- 
toLevelConvert the string passed as argument to a level. If the conversion fails, then this method returnsDEBUG.- Parameters:
- sArg- a string
- Returns:
- corresponding Level
 
- 
toLevelConvert an integer passed as argument to a level. If the conversion fails, then this method returnsDEBUG.- Parameters:
- val- an int
- Returns:
- a level
 
- 
toLevelConvert an integer passed as argument to a level. If the conversion fails, then this method returns the specified default.- Parameters:
- val- a value
- defaultLevel- a defaultLevel
- Returns:
- corresponding Level
 
- 
toLevelConvert the string passed as argument to a level. If the conversion fails, then this method returns the value ofdefaultLevel.- Parameters:
- sArg- a string
- defaultLevel- a default level
- Returns:
- corresponding level
 
 
-