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:
  java.io.Serializable

    public class LogLevel

extends java.lang.Object
implements java.io.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 java.lang.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(java.lang.String label, int precedence)`

Method Summary
`boolean` | `encompasses(LogLevel level)` Returns true if the level supplied is encompassed by this level.
`boolean` | `equals(java.lang.Object o)`
`static java.util.List` | `getAllDefaultLevels()`
`static java.util.List` | `getJdk14Levels()`
`java.lang.String` | `getLabel()` Return the Label of the LogLevel.
`static java.util.List` | `getLog4JLevels()`
`static java.util.Map` | `getLogLevelColorMap()`
`protected int` | `getPrecedence()`
`int` | `hashCode()`
`static void` | `register(java.util.List logLevels)`
`static LogLevel` | `register(LogLevel logLevel)` Registers a used defined LogLevel.
`static void` | `register(LogLevel[] logLevels)`
`static void` | `resetLogLevelColorMap()`
`void` | `setLogLevelColorMap(LogLevel level, java.awt.Color color)`
`java.lang.String` | `toString()`
`static LogLevel` | `valueOf(java.lang.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 java.lang.String _label

### _precedence

    protected int _precedence

Constructor Detail

### LogLevel

    public LogLevel(java.lang.String label,
                    int precedence)

Method Detail

### getLabel

    public java.lang.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(java.lang.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(java.util.List logLevels)

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### setLogLevelColorMap

    public void setLogLevelColorMap(LogLevel level,
                                    java.awt.Color color)

### resetLogLevelColorMap

    public static void resetLogLevelColorMap()

### getLog4JLevels

    public static java.util.List getLog4JLevels()

  Returns:
    A `List` of `LogLevel` objects that map to log4j `Priority` objects.

### getJdk14Levels

    public static java.util.List getJdk14Levels()

### getAllDefaultLevels

    public static java.util.List getAllDefaultLevels()

### getLogLevelColorMap

    public static java.util.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-2007 Apache Software Foundation. All Rights Reserved.