Log4j 1.3alpha-1

org.apache.log4j
Class UtilLoggingLevel

java.lang.Object
  |
  +--org.apache.log4j.Level
        |
        +--org.apache.log4j.UtilLoggingLevel

public class UtilLoggingLevel
extends Level

An extension of the Level class that provides support for java.util.logging Levels.

Author:
Scott Deboy

Field Summary
static UtilLoggingLevel CONFIG
           
static int CONFIG_INT
           
static UtilLoggingLevel FINE
           
static int FINE_INT
           
static UtilLoggingLevel FINER
           
static int FINER_INT
           
static UtilLoggingLevel FINEST
           
static int FINEST_INT
           
static UtilLoggingLevel INFO
           
static int INFO_INT
           
static UtilLoggingLevel SEVERE
           
static int SEVERE_INT
           
static int UNKNOWN_INT
           
static UtilLoggingLevel WARNING
           
static int WARNING_INT
           
 
Fields inherited from class org.apache.log4j.Level
ALL, ALL_INT, DEBUG, DEBUG_INT, ERROR, ERROR_INT, FATAL, FATAL_INT, OFF, OFF_INT, TRACE, TRACE_INT, WARN, WARN_INT
 
Constructor Summary
protected UtilLoggingLevel(int level, java.lang.String levelStr, int syslogEquivalent)
           
 
Method Summary
static java.util.List getAllPossibleLevels()
           
static Level toLevel(int val)
          Convert an integer passed as argument to a level.
static UtilLoggingLevel toLevel(int val, UtilLoggingLevel defaultLevel)
          Convert an integer passed as argument to a level.
static Level toLevel(java.lang.String s)
          Convert the string passed as argument to a level.
static Level toLevel(java.lang.String sArg, Level defaultLevel)
          Convert the string passed as argument to a level.
 
Methods inherited from class org.apache.log4j.Level
equals, getAllPossiblePriorities, getSyslogEquivalent, hashCode, isGreaterOrEqual, toInt, toLevel, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SEVERE_INT

public static final int SEVERE_INT
See Also:
Constant Field Values

WARNING_INT

public static final int WARNING_INT
See Also:
Constant Field Values

INFO_INT

public static final int INFO_INT
See Also:
Constant Field Values

CONFIG_INT

public static final int CONFIG_INT
See Also:
Constant Field Values

FINE_INT

public static final int FINE_INT
See Also:
Constant Field Values

FINER_INT

public static final int FINER_INT
See Also:
Constant Field Values

FINEST_INT

public static final int FINEST_INT
See Also:
Constant Field Values

UNKNOWN_INT

public static final int UNKNOWN_INT
See Also:
Constant Field Values

SEVERE

public static final UtilLoggingLevel SEVERE

WARNING

public static final UtilLoggingLevel WARNING

INFO

public static final UtilLoggingLevel INFO

CONFIG

public static final UtilLoggingLevel CONFIG

FINE

public static final UtilLoggingLevel FINE

FINER

public static final UtilLoggingLevel FINER

FINEST

public static final UtilLoggingLevel FINEST
Constructor Detail

UtilLoggingLevel

protected UtilLoggingLevel(int level,
                           java.lang.String levelStr,
                           int syslogEquivalent)
Method Detail

toLevel

public static UtilLoggingLevel toLevel(int val,
                                       UtilLoggingLevel defaultLevel)
Convert an integer passed as argument to a level. If the conversion fails, then this method returns the specified default.


toLevel

public static Level toLevel(int val)
Description copied from class: Level
Convert an integer passed as argument to a level. If the conversion fails, then this method returns Level.DEBUG.

Parameters:
val - The level integer value
Returns:
The matching Level object

getAllPossibleLevels

public static java.util.List getAllPossibleLevels()

toLevel

public static Level toLevel(java.lang.String s)
Description copied from class: Level
Convert the string passed as argument to a level. If the conversion fails, then this method returns Level.DEBUG.

Parameters:
s - The level name
Returns:
The matching Level object

toLevel

public static Level toLevel(java.lang.String sArg,
                            Level defaultLevel)
Description copied from class: Level
Convert the string passed as argument to a level. If the conversion fails, then this method returns the defaultLevel.

Parameters:
sArg - The Level name
defaultLevel - Level to return if no match is found
Returns:
The matching Level

Log4j 1.3alpha-1

Copyright 2000-2003 Apache Software Foundation.