org.apache.log4j.lf5
Class LogLevel
- Serializable
The LogLevel class defines a set of standard logging levels.
The logging Level objects are ordered and are specified by ordered
integers. Enabling logging at a given level also enables logging at all
higher levels.
- Michael J. Sikorsky
- Robert Shaw
- Brent Sprecher
- Richard Hurst
- Brad Marlborough
CONFIG
public static final LogLevel CONFIG
FINEST
public static final LogLevel FINEST
SEVERE
public static final LogLevel SEVERE
WARNING
public static final LogLevel WARNING
_label
protected String _label
_precedence
protected int _precedence
LogLevel
public LogLevel(String label,
int precedence)
encompasses
public boolean encompasses(LogLevel level)
Returns true if the level supplied is encompassed by this level.
For example, LogLevel.SEVERE encompasses no other LogLevels and
LogLevel.FINE encompasses all other LogLevels. By definition,
a LogLevel encompasses itself.
equals
public boolean equals(Object o)
getAllDefaultLevels
public static List getAllDefaultLevels()
getJdk14Levels
public static List getJdk14Levels()
getLabel
public String getLabel()
Return the Label of the LogLevel.
getLog4JLevels
public static List getLog4JLevels()
- A
List
of LogLevel
objects that map
to log4j Priority
objects.
getLogLevelColorMap
public static Map getLogLevelColorMap()
getPrecedence
protected int getPrecedence()
hashCode
public int hashCode()
register
public static void register(List logLevels)
register
public static LogLevel register(LogLevel logLevel)
Registers a used defined LogLevel.
logLevel
- The log level to be registered. Cannot be a default LogLevel
- LogLevel The replaced log level.
register
public static void register(LogLevel[] logLevels)
resetLogLevelColorMap
public static void resetLogLevelColorMap()
setLogLevelColorMap
public void setLogLevelColorMap(LogLevel level,
Color color)
toString
public String toString()
valueOf
public static LogLevel valueOf(String level)
throws LogLevelFormatException
Convert a log level label into a LogLevel object.
level
- The label of a level to be converted into a LogLevel.
- LogLevel The LogLevel with a label equal to level.
Copyright 2000-2005 Apache Software Foundation.