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:
Serializable
public class UtilLoggingLevel
extends org.apache.log4j.Level
An extension of the Level class that provides support for java.util.logging
Levels.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final UtilLoggingLevel
CONFIG.static final int
Numerical value for CONFIG.static final UtilLoggingLevel
FINE.static final int
Numerical value for FINE.static final UtilLoggingLevel
FINER.static final int
Numerical value for FINER.static final UtilLoggingLevel
FINEST.static final int
Numerical value for FINEST.static final UtilLoggingLevel
INFO.private static final long
Serialization version id.static final UtilLoggingLevel
SEVERE.static final int
Numerical value for SEVERE.static final int
Numerical value for UNKNOWN.static final UtilLoggingLevel
WARNING.static final int
Numerical value for WARNING.Fields inherited from class org.apache.log4j.Level
ALL, DEBUG, ERROR, FATAL, OFF, TRACE, TRACE_INT, WARN
Fields inherited from class org.apache.log4j.Priority
ALL_INT, DEBUG_INT, ERROR_INT, FATAL_INT, INFO_INT, OFF_INT, WARN_INT
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
UtilLoggingLevel
(int level, String levelStr, int syslogEquivalent) Create new instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic List<UtilLoggingLevel>
Gets list of supported levels.static org.apache.log4j.Level
toLevel
(int val) Gets level matching numeric value.static UtilLoggingLevel
toLevel
(int val, UtilLoggingLevel defaultLevel) Convert an integer passed as argument to a level.static org.apache.log4j.Level
Get level with specified symbolic name.static org.apache.log4j.Level
Get level with specified symbolic name.Methods inherited from class org.apache.log4j.Level
toLevel
Methods inherited from class org.apache.log4j.Priority
equals, getAllPossiblePriorities, getSyslogEquivalent, isGreaterOrEqual, toInt, toPriority, toPriority, toPriority, toPriority, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version id.- See Also:
-
SEVERE_INT
public static final int SEVERE_INTNumerical value for SEVERE.- See Also:
-
WARNING_INT
public static final int WARNING_INTNumerical value for WARNING.- See Also:
-
CONFIG_INT
public static final int CONFIG_INTNumerical value for CONFIG.- See Also:
-
FINE_INT
public static final int FINE_INTNumerical value for FINE.- See Also:
-
FINER_INT
public static final int FINER_INTNumerical value for FINER.- See Also:
-
FINEST_INT
public static final int FINEST_INTNumerical value for FINEST.- See Also:
-
UNKNOWN_INT
public static final int UNKNOWN_INTNumerical value for UNKNOWN.- See Also:
-
SEVERE
SEVERE. -
WARNING
WARNING. -
INFO
INFO. -
CONFIG
CONFIG. -
FINE
FINE. -
FINER
FINER. -
FINEST
FINEST.
-
-
Constructor Details
-
UtilLoggingLevel
Create new instance.- Parameters:
level
- numeric value for level.levelStr
- symbolic name for level.syslogEquivalent
- Equivalent syslog severity.
-
-
Method Details
-
toLevel
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 org.apache.log4j.Level toLevel(int val) Gets level matching numeric value.- Parameters:
val
- numeric value.- Returns:
- matching level or UtilLoggerLevel.FINEST if no match.
-
getAllPossibleLevels
Gets list of supported levels.- Returns:
- list of supported levels.
-
toLevel
Get level with specified symbolic name.- Parameters:
s
- symbolic name.- Returns:
- matching level or Level.DEBUG if no match.
-
toLevel
Get level with specified symbolic name.- Parameters:
sArg
- symbolic name.defaultLevel
- level to return if no match.- Returns:
- matching level or defaultLevel if no match.
-