Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.log4j
Class Priority  view Priority download Priority.java

java.lang.Object
  extended byorg.apache.log4j.Priority
Direct Known Subclasses:
Level

public class Priority
extends java.lang.Object

Refrain from using this class directly, use the Level class instead.


Field Summary
static int ALL_INT
           
static Priority DEBUG
          Deprecated. Use Level.DEBUG 55 instead.
static int DEBUG_INT
           
static Priority ERROR
          Deprecated. Use Level.ERROR 55 instead.
static int ERROR_INT
           
static Priority FATAL
          Deprecated. Use Level.FATAL 55 instead.
static int FATAL_INT
           
static Priority INFO
          Deprecated. Use Level.INFO 55 instead.
static int INFO_INT
           
(package private)  int level
           
(package private)  java.lang.String levelStr
           
static int OFF_INT
           
(package private)  int syslogEquivalent
           
static Priority WARN
          Deprecated. Use Level.WARN 55 instead.
static int WARN_INT
           
 
Constructor Summary
protected Priority()
          Default constructor for deserialization.
protected Priority(int level, java.lang.String levelStr, int syslogEquivalent)
          Instantiate a level object.
 
Method Summary
 boolean equals(java.lang.Object o)
          Two priorities are equal if their level fields are equal.
static Priority[] getAllPossiblePriorities()
          Deprecated. This method will be removed with no replacement.
 int getSyslogEquivalent()
          Return the syslog equivalent of this priority as an integer.
 boolean isGreaterOrEqual(Priority r)
          Returns true if this level has a higher or equal level than the level passed as argument, false otherwise.
 int toInt()
          Returns the integer representation of this level.
static Priority toPriority(int val)
          Deprecated. Please use the Level.toLevel(int) 55 method instead.
static Priority toPriority(int val, Priority defaultPriority)
          Deprecated. Please use the Level.toLevel(int, Level) 55 method instead.
static Priority toPriority(java.lang.String sArg)
          Deprecated. Please use the Level.toLevel(String) 55 method instead.
static Priority toPriority(java.lang.String sArg, Priority defaultPriority)
          Deprecated. Please use the Level.toLevel(String, Level) 55 method instead.
 java.lang.String toString()
          Returns the string representation of this priority.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

level

transient int level

levelStr

transient java.lang.String levelStr

syslogEquivalent

transient int syslogEquivalent

OFF_INT

public static final int OFF_INT
See Also:
Constant Field Values

FATAL_INT

public static final int FATAL_INT
See Also:
Constant Field Values

ERROR_INT

public static final int ERROR_INT
See Also:
Constant Field Values

WARN_INT

public static final int WARN_INT
See Also:
Constant Field Values

INFO_INT

public static final int INFO_INT
See Also:
Constant Field Values

DEBUG_INT

public static final int DEBUG_INT
See Also:
Constant Field Values

ALL_INT

public static final int ALL_INT
See Also:
Constant Field Values

FATAL

public static final Priority FATAL
Deprecated. Use Level.FATAL 55 instead.


ERROR

public static final Priority ERROR
Deprecated. Use Level.ERROR 55 instead.


WARN

public static final Priority WARN
Deprecated. Use Level.WARN 55 instead.


INFO

public static final Priority INFO
Deprecated. Use Level.INFO 55 instead.


DEBUG

public static final Priority DEBUG
Deprecated. Use Level.DEBUG 55 instead.

Constructor Detail

Priority

protected Priority()
Default constructor for deserialization.


Priority

protected Priority(int level,
                   java.lang.String levelStr,
                   int syslogEquivalent)
Instantiate a level object.

Method Detail

equals

public boolean equals(java.lang.Object o)
Two priorities are equal if their level fields are equal.

Since:
1.2

getSyslogEquivalent

public final int getSyslogEquivalent()
Return the syslog equivalent of this priority as an integer.


isGreaterOrEqual

public boolean isGreaterOrEqual(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.


getAllPossiblePriorities

public static Priority[] getAllPossiblePriorities()
Deprecated. This method will be removed with no replacement.

Return all possible priorities as an array of Level objects in descending order.


toString

public final java.lang.String toString()
Returns the string representation of this priority.


toInt

public final int toInt()
Returns the integer representation of this level.


toPriority

public static Priority toPriority(java.lang.String sArg)
Deprecated. Please use the Level.toLevel(String) 55 method instead.


toPriority

public static Priority toPriority(int val)
Deprecated. Please use the Level.toLevel(int) 55 method instead.


toPriority

public static Priority toPriority(int val,
                                  Priority defaultPriority)
Deprecated. Please use the Level.toLevel(int, Level) 55 method instead.


toPriority

public static Priority toPriority(java.lang.String sArg,
                                  Priority defaultPriority)
Deprecated. Please use the Level.toLevel(String, Level) 55 method instead.