Package org.apache.log
Class Priority
- java.lang.Object
-
- org.apache.log.Priority
-
- All Implemented Interfaces:
java.io.Serializable
public final class Priority extends java.lang.Object implements java.io.SerializableClass representing and holding constants for priority.- Author:
- Peter Donald
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static PriorityDEBUGDeveloper orientated messages, usually used during development of product.static PriorityERRORA problem has occurred but it is not fatal.static PriorityFATAL_ERRORSomething caused whole system to fail.static PriorityINFOUseful information messages such as state changes, client connection, user login etc.private java.lang.Stringm_nameprivate intm_prioritystatic PriorityNONEDo not log anything.static PriorityWARNA problem or conflict has occurred but it may be recoverable, then again it could be the start of the system failing.
-
Constructor Summary
Constructors Modifier Constructor Description privatePriority(java.lang.String name, int priority)Private Constructor to block instantiation outside class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()Get name of priority.static PrioritygetPriorityForName(java.lang.String priority)Retrieve a Priority object for the name parameter.intgetValue()Get numerical value associated with priority.booleanisGreater(Priority other)Test whether this priority is greater than other priority.booleanisLower(Priority other)Test whether this priority is lower than other priority.booleanisLowerOrEqual(Priority other)Test whether this priority is lower or equal to other priority.private java.lang.ObjectreadResolve()Helper method that replaces deserialized object with correct singleton.java.lang.StringtoString()Overidden string to display Priority in human readable form.
-
-
-
Field Detail
-
DEBUG
public static final Priority DEBUG
Developer orientated messages, usually used during development of product.
-
INFO
public static final Priority INFO
Useful information messages such as state changes, client connection, user login etc.
-
WARN
public static final Priority WARN
A problem or conflict has occurred but it may be recoverable, then again it could be the start of the system failing.
-
ERROR
public static final Priority ERROR
A problem has occurred but it is not fatal. The system will still function.
-
FATAL_ERROR
public static final Priority FATAL_ERROR
Something caused whole system to fail. This indicates that an administrator should restart the system and try to fix the problem that caused the failure.
-
NONE
public static final Priority NONE
Do not log anything.
-
m_name
private final java.lang.String m_name
-
m_priority
private final int m_priority
-
-
Method Detail
-
getPriorityForName
public static Priority getPriorityForName(java.lang.String priority)
Retrieve a Priority object for the name parameter.- Parameters:
priority- the priority name- Returns:
- the Priority for name
-
toString
public java.lang.String toString()
Overidden string to display Priority in human readable form.- Overrides:
toStringin classjava.lang.Object- Returns:
- the string describing priority
-
getValue
public int getValue()
Get numerical value associated with priority.- Returns:
- the numerical value
-
getName
public java.lang.String getName()
Get name of priority.- Returns:
- the priorities name
-
isGreater
public boolean isGreater(Priority other)
Test whether this priority is greater than other priority.- Parameters:
other- the other Priority- Returns:
- TRUE if the priority is greater else FALSE
-
isLower
public boolean isLower(Priority other)
Test whether this priority is lower than other priority.- Parameters:
other- the other Priority- Returns:
- TRUE if the priority is lower else FALSE
-
isLowerOrEqual
public boolean isLowerOrEqual(Priority other)
Test whether this priority is lower or equal to other priority.- Parameters:
other- the other Priority- Returns:
- TRUE if the priority is lower or equal else FALSE
-
readResolve
private java.lang.Object readResolve()
Helper method that replaces deserialized object with correct singleton.- Returns:
- the singleton version of object
-
-