public final class

RootLogger

extends Logger
java.lang.Object
   ↳ org.apache.log4j.Category
     ↳ org.apache.log4j.Logger
       ↳ org.apache.log4j.spi.RootLogger

Class Overview

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.

Summary

[Expand]
Inherited Fields
From class org.apache.log4j.Category
Public Constructors
RootLogger(Level level)
The root logger names itself as "root".
Public Methods
final Level getChainedLevel()
Return the assigned level value without walking the logger hierarchy.
final void setLevel(Level level)
Setting a null value to the level of the root logger may have catastrophic results.
[Expand]
Inherited Methods
From class org.apache.log4j.Logger
From class org.apache.log4j.Category
From class java.lang.Object
From interface org.apache.log4j.spi.AppenderAttachable

Public Constructors

public RootLogger (Level level)

The root logger names itself as "root". However, the root logger cannot be retrieved by name.

Public Methods

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.