Save This Page
Home » slf4j-1.5.5 » org.apache » log4j » spi » [javadoc | source]
org.apache.log4j.spi
public final class: RootLogger [javadoc | source]
java.lang.Object
   org.apache.log4j.Category
      org.apache.log4j.Logger
         org.apache.log4j.spi.RootLogger

All Implemented Interfaces:
    AppenderAttachable

RootLogger sits at the top of the logger hierachy. It is a regular logger except that it provides several guarantees.

First, it cannot be assigned a null level. Second, since root logger cannot have a parent, the #getChainedLevel method always returns the value of the level field without walking the hierarchy.

Fields inherited from org.apache.log4j.Category:
name,  level,  parent,  resourceBundle,  repository,  aai,  additive
Constructor:
 public RootLogger(Level level) 
    The root logger names itself as "root". However, the root logger cannot be retrieved by name.
Method from org.apache.log4j.spi.RootLogger Summary:
getChainedLevel,   setLevel
Methods from org.apache.log4j.Logger:
getLogger,   getLogger,   getLogger,   getRootLogger,   isTraceEnabled,   trace,   trace
Methods from org.apache.log4j.Category:
addAppender,   assertLog,   callAppenders,   closeNestedAppenders,   debug,   debug,   error,   error,   exists,   fatal,   fatal,   forcedLog,   getAdditivity,   getAllAppenders,   getAppender,   getChainedPriority,   getCurrentCategories,   getDefaultHierarchy,   getEffectiveLevel,   getHierarchy,   getInstance,   getInstance,   getLevel,   getLoggerRepository,   getName,   getParent,   getPriority,   getResourceBundle,   getResourceBundleString,   getRoot,   info,   info,   isAttached,   isDebugEnabled,   isEnabledFor,   isInfoEnabled,   l7dlog,   l7dlog,   log,   log,   log,   removeAllAppenders,   removeAppender,   removeAppender,   setAdditivity,   setHierarchy,   setLevel,   setPriority,   setResourceBundle,   shutdown,   warn,   warn
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.log4j.spi.RootLogger Detail:
 public final Level getChainedLevel() 
    Return the assigned level value without walking the logger hierarchy.
 public final  void setLevel(Level level) 
    Setting a null value to the level of the root logger may have catastrophic results. We prevent this here.