org.jboss.logging
Class XLevel

java.lang.Object
  extended byLevel
      extended byorg.jboss.logging.XLevel

public class XLevel
extends Level

Provides custom extention levels for use with the Log4j logging framework.

Adds a trace level that is below the standard Log4j DEBUG level.

This is a custom level that is 100 below the Level#DEBUG_INT and represents a lower level useful for logging events that should only be displayed when deep debugging is required.

See Also:
org.apache.log4j.Level, Serialized Form

Field Summary
static XLevel (src) TRACE
          The TRACE level object singleton
static int TRACE_INT
          The integer representation of the level, (Level#DEBUG_INT - 100)
static java.lang.String TRACE_STR
          The string name of the trace level.
 
Constructor Summary
protected XLevel(int level, java.lang.String strLevel, int syslogEquiv)
          Construct a XLevel.
 
Method Summary
static Level toLevel(int i)
          Convert an integer passed as argument to a priority.
static Level toLevel(int i, Level defaultLevel)
          Convert an integer passed as argument to a level.
static Level toLevel(java.lang.String name)
          Convert an integer passed as argument to a level.
static Level toLevel(java.lang.String name, Level defaultLevel)
          Convert an integer passed as argument to a level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRACE_INT

public static final int TRACE_INT
The integer representation of the level, (Level#DEBUG_INT - 100)


TRACE_STR

public static final java.lang.String TRACE_STR
The string name of the trace level.

See Also:
Constant Field Values (src)

TRACE

public static final XLevel (src)  TRACE
The TRACE level object singleton

Constructor Detail

XLevel

protected XLevel(int level,
                 java.lang.String strLevel,
                 int syslogEquiv)
Construct a XLevel.

Method Detail

toLevel

public static Level toLevel(java.lang.String name,
                            Level defaultLevel)
Convert an integer passed as argument to a level. If the conversion fails, then this method returns the specified default.

Returns:
the Level object for name if one exists, defaultLevel otherwize.

toLevel

public static Level toLevel(java.lang.String name)
Convert an integer passed as argument to a level.

Returns:
the Level object for name if one exists

toLevel

public static Level toLevel(int i)
Convert an integer passed as argument to a priority. If the conversion fails, then this method returns the specified default.

Returns:
the Level object for i if one exists, defaultLevel otherwize.

toLevel

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

Returns:
the Level object for i if one exists, defaultLevel otherwize.