Class Priority

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

@Deprecated(since="2022-01-27") public class Priority extends Object
Deprecated.
Apache Log4j 1 has reached end of life in 2015 and is no longer supported.
Refrain from using this class directly, use the Level class instead.
  • Field Details

  • Method Details

    • equals

      public boolean equals(Object o)
      Deprecated.
      Two priorities are equal if their level fields are equal.
      Overrides:
      equals in class Object
      Since:
      1.2
    • getSyslogEquivalent

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

      public boolean isGreaterOrEqual(Priority r)
      Deprecated.
      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 String toString()
      Deprecated.
      Returns the string representation of this priority.
      Overrides:
      toString in class Object
    • toInt

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

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

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

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

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