Package org.apache.log
Class Priority
java.lang.Object
org.apache.log.Priority
- All Implemented Interfaces:
Serializable
Class representing and holding constants for priority.
- Author:
- Peter Donald
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Priority
Developer orientated messages, usually used during development of product.static final Priority
A problem has occurred but it is not fatal.static final Priority
Something caused whole system to fail.static final Priority
Useful information messages such as state changes, client connection, user login etc.private final String
private final int
static final Priority
Do not log anything.static final Priority
A problem or conflict has occurred but it may be recoverable, then again it could be the start of the system failing. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Get name of priority.static Priority
getPriorityForName
(String priority) Retrieve a Priority object for the name parameter.int
getValue()
Get numerical value associated with priority.boolean
Test whether this priority is greater than other priority.boolean
Test whether this priority is lower than other priority.boolean
isLowerOrEqual
(Priority other) Test whether this priority is lower or equal to other priority.private Object
Helper method that replaces deserialized object with correct singleton.toString()
Overidden string to display Priority in human readable form.
-
Field Details
-
DEBUG
Developer orientated messages, usually used during development of product. -
INFO
Useful information messages such as state changes, client connection, user login etc. -
WARN
A problem or conflict has occurred but it may be recoverable, then again it could be the start of the system failing. -
ERROR
A problem has occurred but it is not fatal. The system will still function. -
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
Do not log anything. -
m_name
-
m_priority
private final int m_priority
-
-
Constructor Details
-
Priority
Private Constructor to block instantiation outside class.- Parameters:
name
- the string name of prioritypriority
- the numerical code of priority
-
-
Method Details
-
getPriorityForName
Retrieve a Priority object for the name parameter.- Parameters:
priority
- the priority name- Returns:
- the Priority for name
-
toString
Overidden string to display Priority in human readable form. -
getValue
public int getValue()Get numerical value associated with priority.- Returns:
- the numerical value
-
getName
Get name of priority.- Returns:
- the priorities name
-
isGreater
Test whether this priority is greater than other priority.- Parameters:
other
- the other Priority- Returns:
- TRUE if the priority is greater else FALSE
-
isLower
Test whether this priority is lower than other priority.- Parameters:
other
- the other Priority- Returns:
- TRUE if the priority is lower else FALSE
-
isLowerOrEqual
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
Helper method that replaces deserialized object with correct singleton.- Returns:
- the singleton version of object
-