Class: Logging::RootLogger

### Home Classes Methods

### In Files

- lib/logging/root_logger.rb

### Parent

Logging::Logger

### Methods

- ::new
- #<=>
- #level=

### Files

- History.txt

### Class/Module Index

Quicksearch

- Logging
- Logging::Appender
- Logging::Appenders
- Logging::Appenders::Buffering
- Logging::Appenders::File
- Logging::Appenders::IO
- Logging::Appenders::RollingFile
- Logging::Appenders::RollingFile::Roller
- Logging::Appenders::Stderr
- Logging::Appenders::Stdout
- Logging::Appenders::StringIo
- Logging::Appenders::Syslog
- Logging::ColorScheme
- Logging::Filter
- Logging::Filters
- Logging::Filters::Level
- Logging::Layout
- Logging::Layouts
- Logging::Layouts::Basic
- Logging::Layouts::Parseable
- Logging::Layouts::Pattern
- Logging::Logger
- Logging::MappedDiagnosticContext
- Logging::NestedDiagnosticContext
- Logging::Proxy
- Logging::RailsCompat
- Logging::Repository
- Logging::Repository::Singleton
- Logging::RootLogger
- RSpec
- RSpec::Core
- RSpec::Core::Configuration
- RSpec::LoggingHelper
- RSpec::LoggingHelper
- Spec
- Spec::Runner
- Spec::Runner::Configuration
- Object
- Object::LoggingHelper
- File
- FileUtils
- Module
- ReentrantMutex
- String

No matching classes.

# Logging::RootLogger

The root logger exists to ensure that all loggers have a parent and a defined logging level. If a logger is additive, eventually its log events will propagate up to the root logger.

### Attributes

level[R]

### Public Class Methods

new click to toggle source

Returns a new root logger instance. This method will be called only once when the `Repository` singleton instance is created.

    # File lib/logging/root_logger.rb, line 23
    def initialize( )
      ::Logging.init unless ::Logging.initialized?

      @name = 'root'
      @appenders = []
      @additive = false
      @caller_tracing = false
      @level = 0
      ::Logging::Logger.define_log_methods(self)
    end

### Public Instance Methods

log <=> other click to toggle source

Compares this logger by name to another logger. The normal return codes for `String` objects apply.

    # File lib/logging/root_logger.rb, line 40
    def <=>( other )
      case other
      when self; 0
      when ::Logging::Logger; -1
      else raise ArgumentError, 'expecting a Logger instance' end
    end

level = :all click to toggle source

Set the level for the root logger. The functionality of this method is the same as +Logger#level=+, but setting the level to `nil` for the root logger is not allowed. The level is silently set to :all.

    # File lib/logging/root_logger.rb, line 54
    def level=( level )
      super(level || 0)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.