org.apache.log4j.spi
Class RootCategory
java.lang.Object
|
+--org.apache.log4j.Category
|
+--org.apache.log4j.spi.RootCategory
- All Implemented Interfaces:
- AppenderAttachable
- public final class RootCategory
- extends Category
RootCategory sits at the top of the category hierachy. It is a
regular category except that it provides several guarantees.
First, it cannot be assigned a null
priority. Second, since root category cannot have a parent, the
getChainedPriority()
method always returns the value of the
priority field without walking the hierarchy.
- Author:
- Ceki Gülcü
Method Summary |
Priority |
getChainedPriority()
Return the assigned priority value without walking the category
hierarchy. |
void |
setPriority(Priority priority)
Setting a null value to the priority of the root category may have catastrophic
results. |
Methods inherited from class org.apache.log4j.Category |
addAppender, assert, callAppenders, debug, debug, error, error, exists, fatal, fatal, forcedLog, getAdditivity, getAllAppenders, getAppender, getCurrentCategories, getDefaultHierarchy, getHierarchy, getInstance, getInstance, getInstance, getName, getPriority, getResourceBundle, getResourceBundleString, getRoot, info, info, isDebugEnabled, isEnabledFor, isInfoEnabled, l7dlog, l7dlog, log, log, log, removeAllAppenders, removeAppender, removeAppender, setAdditivity, setResourceBundle, shutdown, warn, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RootCategory
public RootCategory(Priority priority)
- The root category names itself as "root". However, the root
category cannot be retrieved by name.
getChainedPriority
public final Priority getChainedPriority()
- Return the assigned priority value without walking the category
hierarchy.
- Overrides:
getChainedPriority
in class Category
setPriority
public final void setPriority(Priority priority)
- Setting a null value to the priority of the root category may have catastrophic
results. We prevent this here.
- Overrides:
setPriority
in class Category
- Since:
- 0.8.3
Please notify me about new log4j releases.