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:
  • Field Details

    • 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 Details

    • LogLevel

      public LogLevel(String label, int precedence)
  • Method Details

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