Methods Summary |
---|
public boolean | equals(java.lang.Object o)Two priorities are equal if their level fields are equal.
if(o instanceof Priority) {
Priority r = (Priority) o;
return (this.level == r.level);
} else {
return false;
}
|
public static org.apache.log4j.Priority[] | getAllPossiblePriorities()Return all possible priorities as an array of Level objects in
descending order.
return new Priority[] {Priority.FATAL, Priority.ERROR, Level.WARN,
Priority.INFO, Priority.DEBUG};
|
public final int | getSyslogEquivalent()Return the syslog equivalent of this priority as an integer.
return syslogEquivalent;
|
public boolean | isGreaterOrEqual(org.apache.log4j.Priority r)Returns true if this level has a higher or equal
level than the level passed as argument, false
otherwise.
You should think twice before overriding the default
implementation of isGreaterOrEqual method.
return level >= r.level;
|
public final int | toInt()Returns the integer representation of this level.
return level;
|
public static org.apache.log4j.Priority | toPriority(int val)
return toPriority(val, Priority.DEBUG);
|
public static org.apache.log4j.Priority | toPriority(int val, org.apache.log4j.Priority defaultPriority)
return Level.toLevel(val, (Level) defaultPriority);
|
public static org.apache.log4j.Priority | toPriority(java.lang.String sArg, org.apache.log4j.Priority defaultPriority)
return Level.toLevel(sArg, (Level) defaultPriority);
|
public static org.apache.log4j.Priority | toPriority(java.lang.String sArg)
return Level.toLevel(sArg);
|
public final java.lang.String | toString()Returns the string representation of this priority.
return levelStr;
|