Parent

Methods

Included Modules

Class Index [+]

Quicksearch

Ramaze::Logger::LogHub

Bundles different informer instances and sends incoming messages to each. This is the default with Informer as only member.

Attributes

loggers[RW]
ignored_tags[RW]

Public Class Methods

new(*loggers) click to toggle source

Takes a list of instances or classes (which will be initialized) and that are added to @loggers. All messages are then sent to each member.

@param [Array] loggers

    # File lib/ramaze/log/hub.rb, line 22
22:       def initialize(*loggers)
23:         @loggers = loggers
24:         @ignored_tags = Set.new
25:         @loggers.map! do |logger|
26:           next(nil) if logger == self
27:           logger.is_a?(Class) ? logger.new : logger
28:         end
29:         @loggers.uniq!
30:         @loggers.compact!
31:       end

Public Instance Methods

log(tag, *args) click to toggle source

Integration to Logging

@param [String] tag @param [Hash] args

    # File lib/ramaze/log/hub.rb, line 39
39:       def log(tag, *args)
40:         return if @ignored_tags.include?(tag)
41:         @loggers.each do |logger|
42:           logger.log(tag, *args)
43:         end
44:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.