Sha256: 7b1c26c4f063a5033c2858080b7297729ea7ccbe0627f469b44a800b829f0447

Contents?: true

Size: 574 Bytes

Versions: 2

Compression:

Stored size: 574 Bytes

Contents

require 'singleton'
require 'logging/nutella_logger'
require 'logging/nutella_logger-remote'

module Nutella

  class NutellaLogging
    include Singleton
    
    def initialize
      console = NutellaLogger.new("console")
      log = NutellaLoggerRemote.new("log")
      @loggers = {"log" => log, "console" => console}
    end
    
    def logger(name)
      @loggers[name]
    end 
    
  end
  
end


module Kernel
  
  def console
    Nutella::NutellaLogging.instance.logger('console')
  end
  
  def log
    Nutella::NutellaLogging.instance.logger('log')
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nutella_framework-0.1.2 lib/logging/nutella_logging.rb
nutella_framework-0.1.0 lib/logging/nutella_logging.rb