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.
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 23: def initialize( ) 24: ::Logging.init unless ::Logging.initialized? 25: 26: @name = 'root' 27: @appenders = [] 28: @additive = false 29: @trace = false 30: @level = 0 31: ::Logging::Logger.define_log_methods(self) 32: end
Compares this logger by name to another logger. The normal return codes for String objects apply.
# File lib/logging/root_logger.rb, line 40 40: def <=>( other ) 41: case other 42: when self; 0 43: when ::Logging::Logger; 1 44: else raise ArgumentError, 'expecting a Logger instance' end 45: end
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 54: def level=( level ) 55: super(level || 0) 56: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.