Log4j 1.1.3

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ü

Fields inherited from class org.apache.log4j.Category
additive, DEFAULT_CONFIGURATION_FILE, DEFAULT_CONFIGURATION_KEY, DEFAULT_INIT_OVERRIDE_KEY, defaultHierarchy, hierarchy, name, parent, priority, resourceBundle
 
Constructor Summary
RootCategory(Priority priority)
          The root category names itself as "root".
 
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
 

Constructor Detail

RootCategory

public RootCategory(Priority priority)
The root category names itself as "root". However, the root category cannot be retrieved by name.
Method Detail

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

Log4j 1.1.3

Please notify me about new log4j releases.