public class

Priority

extends Object
java.lang.Object
   ↳ org.apache.log4j.Priority
Known Direct Subclasses

Class Overview

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

Summary

Constants
int ALL_INT
int DEBUG_INT
int ERROR_INT
int FATAL_INT
int INFO_INT
int OFF_INT
int WARN_INT
Fields
public static final Priority DEBUG This field is deprecated. Use DEBUG instead.
public static final Priority ERROR This field is deprecated. Use ERROR instead.
public static final Priority FATAL This field is deprecated. Use FATAL instead.
public static final Priority INFO This field is deprecated. Use INFO instead.
public static final Priority WARN This field is deprecated. Use WARN instead.
Protected Constructors
Priority()
Default constructor for deserialization.
Priority(int level, String levelStr, int syslogEquivalent)
Instantiate a level object.
Public Methods
boolean equals(Object o)
Two priorities are equal if their level fields are equal.
static Priority[] getAllPossiblePriorities()
This method is deprecated. This method will be removed with no replacement.
final 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.
final int toInt()
Returns the integer representation of this level.
static Priority toPriority(String sArg, Priority defaultPriority)
This method is deprecated. Please use the toLevel(String, Level) method instead.
static Priority toPriority(int val)
This method is deprecated. Please use the toLevel(int) method instead.
static Priority toPriority(String sArg)
This method is deprecated. Please use the toLevel(String) method instead.
static Priority toPriority(int val, Priority defaultPriority)
This method is deprecated. Please use the toLevel(int, Level) method instead.
final String toString()
Returns the string representation of this priority.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int ALL_INT

Constant Value: -2147483648 (0x80000000)

public static final int DEBUG_INT

Constant Value: 10000 (0x00002710)

public static final int ERROR_INT

Constant Value: 40000 (0x00009c40)

public static final int FATAL_INT

Constant Value: 50000 (0x0000c350)

public static final int INFO_INT

Constant Value: 20000 (0x00004e20)

public static final int OFF_INT

Constant Value: 2147483647 (0x7fffffff)

public static final int WARN_INT

Constant Value: 30000 (0x00007530)

Fields

public static final Priority DEBUG

This field is deprecated.
Use DEBUG instead.

public static final Priority ERROR

This field is deprecated.
Use ERROR instead.

public static final Priority FATAL

This field is deprecated.
Use FATAL instead.

public static final Priority INFO

This field is deprecated.
Use INFO instead.

public static final Priority WARN

This field is deprecated.
Use WARN instead.

Protected Constructors

protected Priority ()

Default constructor for deserialization.

protected Priority (int level, String levelStr, int syslogEquivalent)

Instantiate a level object.

Public Methods

public boolean equals (Object o)

Two priorities are equal if their level fields are equal.

public static Priority[] getAllPossiblePriorities ()

This method is deprecated.
This method will be removed with no replacement.

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

public final int getSyslogEquivalent ()

Return the syslog equivalent of this priority as an integer.

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.

public final int toInt ()

Returns the integer representation of this level.

public static Priority toPriority (String sArg, Priority defaultPriority)

This method is deprecated.
Please use the toLevel(String, Level) method instead.

public static Priority toPriority (int val)

This method is deprecated.
Please use the toLevel(int) method instead.

public static Priority toPriority (String sArg)

This method is deprecated.
Please use the toLevel(String) method instead.

public static Priority toPriority (int val, Priority defaultPriority)

This method is deprecated.
Please use the toLevel(int, Level) method instead.

public final String toString ()

Returns the string representation of this priority.