Package org.apache.log4j.helpers
Class UtilLoggingLevel
- java.lang.Object
-
- org.apache.log4j.Priority
-
- org.apache.log4j.Level
-
- org.apache.log4j.helpers.UtilLoggingLevel
-
- All Implemented Interfaces:
java.io.Serializable
public class UtilLoggingLevel extends Level
An extension of the Level class that provides support for java.util.logging Levels.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static UtilLoggingLevelCONFIGCONFIG.static intCONFIG_INTNumerical value for CONFIG.static UtilLoggingLevelFINEFINE.static intFINE_INTNumerical value for FINE.static UtilLoggingLevelFINERFINER.static intFINER_INTNumerical value for FINER.static UtilLoggingLevelFINESTFINEST.static intFINEST_INTNumerical value for FINEST.static UtilLoggingLevelINFOINFO.private static longserialVersionUIDSerialization version id.static UtilLoggingLevelSEVERESEVERE.static intSEVERE_INTNumerical value for SEVERE.static intUNKNOWN_INTNumerical value for UNKNOWN.static UtilLoggingLevelWARNINGWARNING.static intWARNING_INTNumerical value for WARNING.
-
Constructor Summary
Constructors Modifier Constructor Description protectedUtilLoggingLevel(int level, java.lang.String levelStr, int syslogEquivalent)Create new instance.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.ListgetAllPossibleLevels()Gets list of supported levels.static LeveltoLevel(int val)Gets level matching numeric value.static UtilLoggingLeveltoLevel(int val, UtilLoggingLevel defaultLevel)Convert an integer passed as argument to a level.static LeveltoLevel(java.lang.String s)Get level with specified symbolic name.static LeveltoLevel(java.lang.String sArg, Level defaultLevel)Get level with specified symbolic name.-
Methods inherited from class org.apache.log4j.Level
readResolve, toLevel
-
Methods inherited from class org.apache.log4j.Priority
equals, getAllPossiblePriorities, getSyslogEquivalent, getVersion2Level, hashCode, isGreaterOrEqual, toInt, toPriority, toPriority, toPriority, toPriority, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Serialization version id.- See Also:
- Constant Field Values
-
SEVERE_INT
public static final int SEVERE_INT
Numerical value for SEVERE.- See Also:
- Constant Field Values
-
WARNING_INT
public static final int WARNING_INT
Numerical value for WARNING.- See Also:
- Constant Field Values
-
CONFIG_INT
public static final int CONFIG_INT
Numerical value for CONFIG.- See Also:
- Constant Field Values
-
FINE_INT
public static final int FINE_INT
Numerical value for FINE.- See Also:
- Constant Field Values
-
FINER_INT
public static final int FINER_INT
Numerical value for FINER.- See Also:
- Constant Field Values
-
FINEST_INT
public static final int FINEST_INT
Numerical value for FINEST.- See Also:
- Constant Field Values
-
UNKNOWN_INT
public static final int UNKNOWN_INT
Numerical value for UNKNOWN.- See Also:
- Constant Field Values
-
SEVERE
public static final UtilLoggingLevel SEVERE
SEVERE.
-
WARNING
public static final UtilLoggingLevel WARNING
WARNING.
-
INFO
public static final UtilLoggingLevel INFO
INFO.
-
CONFIG
public static final UtilLoggingLevel CONFIG
CONFIG.
-
FINE
public static final UtilLoggingLevel FINE
FINE.
-
FINER
public static final UtilLoggingLevel FINER
FINER.
-
FINEST
public static final UtilLoggingLevel FINEST
FINEST.
-
-
Method Detail
-
toLevel
public static UtilLoggingLevel toLevel(int val, UtilLoggingLevel defaultLevel)
Convert an integer passed as argument to a level. If the conversion fails, then this method returns the specified default.- Parameters:
val- numeric value.defaultLevel- level to be returned if no level matches numeric value.- Returns:
- matching level or default level.
-
toLevel
public static Level toLevel(int val)
Gets level matching numeric value.- Parameters:
val- numeric value.- Returns:
- matching level or UtilLoggerLevel.FINEST if no match.
-
getAllPossibleLevels
public static java.util.List getAllPossibleLevels()
Gets list of supported levels.- Returns:
- list of supported levels.
-
toLevel
public static Level toLevel(java.lang.String s)
Get level with specified symbolic name.- Parameters:
s- symbolic name.- Returns:
- matching level or Level.DEBUG if no match.
-
-