Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary
`protected String` | `_label`
`protected int` | `_precedence`
`static LogLevel` | `CONFIG`
`static LogLevel` | `DEBUG`
`static LogLevel` | `ERROR`
`static LogLevel` | `FATAL`
`static LogLevel` | `FINE`
`static LogLevel` | `FINER`
`static LogLevel` | `FINEST`
`static LogLevel` | `INFO`
`static LogLevel` | `SEVERE`
`static LogLevel` | `WARN`
`static LogLevel` | `WARNING`

Constructor Summary
`LogLevel(String label, int precedence)`

Method Summary
`boolean` | `encompasses(LogLevel level)` Returns true if the level supplied is encompassed by this level.
`boolean` | `equals(Object o)`
`static List` | `getAllDefaultLevels()`
`static List` | `getJdk14Levels()`
`String` | `getLabel()` Return the Label of the LogLevel.
`static List` | `getLog4JLevels()`
`static Map` | `getLogLevelColorMap()`
`protected int` | `getPrecedence()`
`int` | `hashCode()`
`static void` | `register(List logLevels)`
`static LogLevel` | `register(LogLevel logLevel)` Registers a used defined LogLevel.
`static void` | `register(LogLevel[] logLevels)`
`static void` | `resetLogLevelColorMap()`
`void` | `setLogLevelColorMap(LogLevel level, Color color)`
`String` | `toString()`
`static LogLevel` | `valueOf(String level)` Convert a log level label into a LogLevel object.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### 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

Constructor Detail

### LogLevel

    public LogLevel(String label,
                    int precedence)

Method Detail

### 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()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.