Log4j Version 1.2.14: Class LogLevel

Log4j 1.2

Log4j 1.2.14

org.apache.log4j.lf5 Class LogLevel

java.lang.Object
  |
  +--org.apache.log4j.lf5.LogLevel
All Implemented Interfaces:
Serializable

public class LogLevel
extends Object
implements 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.

Author:
Michael J. Sikorsky, Robert Shaw, Brent Sprecher, Richard Hurst, Brad Marlborough
See Also:
Serialized Form

protected  String
protected  int
static LogLevel
static LogLevel
static LogLevel
static LogLevel
static LogLevel
static LogLevel
static LogLevel
static LogLevel
static LogLevel
static LogLevel
static LogLevel
 
 
 boolean
 boolean
static List
static List
 String
static List
static Map
protected  int
 int
static void
static LogLevel
static void
static void
 void
 String
static LogLevel
 
 

FATAL

public static final LogLevel FATAL

ERROR

public static final LogLevel ERROR

WARN

public static final LogLevel WARN

INFO

public static final LogLevel INFO

DEBUG

public static final LogLevel DEBUG

SEVERE

public static final LogLevel SEVERE

WARNING

public static final LogLevel WARNING

CONFIG

public static final LogLevel CONFIG

FINE

public static final LogLevel FINE

FINER

public static final LogLevel FINER

FINEST

public static final LogLevel FINEST

_label

protected String _label

_precedence

protected int _precedence

LogLevel

public LogLevel(String label,
                int precedence)

getLabel

public String getLabel()
Return the Label of the LogLevel.

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.

valueOf

public static LogLevel valueOf(String level)
                        throws LogLevelFormatException
Convert a log level label into a LogLevel object.
Parameters:
level - The label of a level to be converted into a LogLevel.
Returns:
LogLevel The LogLevel with a label equal to level.
Throws:
LogLevelFormatException - Is thrown when the level can not be converted into a LogLevel.

register

public static LogLevel register(LogLevel logLevel)
Registers a used defined LogLevel.
Parameters:
logLevel - The log level to be registered. Cannot be a default LogLevel
Returns:
LogLevel The replaced log level.

register

public static void register(LogLevel[] logLevels)

register

public static void register(List logLevels)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

setLogLevelColorMap

public void setLogLevelColorMap(LogLevel level,
                                Color color)

resetLogLevelColorMap

public static void resetLogLevelColorMap()

getLog4JLevels

public static List getLog4JLevels()
Returns:
A List of LogLevel objects that map to log4j Priority objects.

getJdk14Levels

public static List getJdk14Levels()

getAllDefaultLevels

public static List getAllDefaultLevels()

getLogLevelColorMap

public static Map getLogLevelColorMap()

getPrecedence

protected int getPrecedence()

Log4j 1.2.14

Copyright 2000-2005 Apache Software Foundation.