RootLogger Class | Apache log4net™ SDK Documentation

The RootLogger sits at the root of the logger hierarchy tree.
Inheritance Hierarchy

System
Object
log4net.Repository.Hierarchy
Logger
log4net.Repository.Hierarchy
RootLogger

Namespace: log4net.Repository.Hierarchy
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public class RootLogger : Logger

    Public Class RootLogger
    	Inherits Logger

    public ref class RootLogger : public Logger

    type RootLogger =
        class
            inherit Logger
        end

The RootLogger type exposes the following members.

Constructors

| Name | Description
--- | --- | ---
| RootLogger | Construct a RootLogger

Top
Properties

| Name | Description
--- | --- | ---
| Additivity | Gets or sets a value indicating if child loggers inherit their parent's appenders. (Inherited from Logger.)
| Appenders | Get the appenders contained in this logger as an ICollection. (Inherited from Logger.)
| EffectiveLevel | Gets the assigned level value without walking the logger hierarchy. (Overrides Logger EffectiveLevel.)
| Hierarchy | Gets or sets the Hierarchy where this Logger instance is attached to. (Inherited from Logger.)
| Level | Gets or sets the assigned Level for the root logger. (Overrides Logger Level.)
| Name | Gets the logger name. (Inherited from Logger.)
| Parent | Gets or sets the parent logger in the hierarchy. (Inherited from Logger.)
| Repository | Gets the ILoggerRepository where this Logger instance is attached to. (Inherited from Logger.)

Top
Methods

| Name | Description
--- | --- | ---
| AddAppender | Add newAppender to the list of appenders of this Logger instance. (Inherited from Logger.)
| CallAppenders | Deliver the LoggingEvent to the attached appenders. (Inherited from Logger.)
| CloseNestedAppenders | Closes all attached appenders implementing the IAppenderAttachable interface. (Inherited from Logger.)
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
| ForcedLog(LoggingEvent) | Creates a new logging event and logs the event without further checks. (Inherited from Logger.)
| ForcedLog(Type, Level, Object, Exception) | Creates a new logging event and logs the event without further checks. (Inherited from Logger.)
| GetAppender | Look for the appender named as name (Inherited from Logger.)
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.)
| GetType | Gets the Type of the current instance. (Inherited from Object.)
| IsEnabledFor | Checks if this logger is enabled for a given Level passed as parameter. (Inherited from Logger.)
| Log(LoggingEvent) | This is the most generic printing method that is intended to be used by wrappers. (Inherited from Logger.)
| Log(Level, Object, Exception) | This is the most generic printing method. This generic form is intended to be used by wrappers (Inherited from Logger.)
| Log(Type, Level, Object, Exception) | This generic form is intended to be used by wrappers. (Inherited from Logger.)
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.)
| RemoveAllAppenders | Remove all previously added appenders from this Logger instance. (Inherited from Logger.)
| RemoveAppender(String) | Remove the appender passed as parameter form the list of appenders. (Inherited from Logger.)
| RemoveAppender(IAppender) | Remove the appender passed as parameter form the list of appenders. (Inherited from Logger.)
| ToString | Returns a String that represents the current Object. (Inherited from Object.)

Top
Remarks

The RootLogger is a regular Logger except that it provides several guarantees.

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

See Also

#### Reference

log4net.Repository.Hierarchy Namespace