FileDocCategorySizeDatePackage
XLevel.javaAPI DocApache log4j 1.2.152434Sat Aug 25 00:09:44 BST 2007examples.customLevel

XLevel

public class XLevel extends Level
This class introduces a new level level called TRACE. TRACE has lower level than DEBUG.

Fields Summary
private static final long
serialVersionUID
public static final int
TRACE_INT
public static final int
LETHAL_INT
private static String
TRACE_STR
private static String
LETHAL_STR
public static final XLevel
TRACE
public static final XLevel
LETHAL
Constructors Summary
protected XLevel(int level, String strLevel, int syslogEquiv)



  
        
    super(level, strLevel, syslogEquiv);
  
Methods Summary
public static org.apache.log4j.LeveltoLevel(java.lang.String sArg)
Convert the string passed as argument to a level. If the conversion fails, then this method returns {@link #TRACE}.

    return (Level) toLevel(sArg, XLevel.TRACE);
  
public static org.apache.log4j.LeveltoLevel(java.lang.String sArg, org.apache.log4j.Level defaultValue)


    if(sArg == null) {
      return defaultValue;
    }
    String stringVal = sArg.toUpperCase();
    
    if(stringVal.equals(TRACE_STR)) {
      return XLevel.TRACE;
    } else if(stringVal.equals(LETHAL_STR)) {
      return XLevel.LETHAL;
    }
      
    return Level.toLevel(sArg, (Level) defaultValue);    
  
public static org.apache.log4j.LeveltoLevel(int i)

    switch(i) {
    case TRACE_INT: return XLevel.TRACE;
    case LETHAL_INT: return XLevel.LETHAL;
    }
    return Level.toLevel(i);