lib/cabin/logger.rb in cabin-0.1.2 vs lib/cabin/logger.rb in cabin-0.1.3

- old
+ new

@@ -1,6 +1,7 @@ require "cabin/namespace" +require "ap" # This module implements methods that act somewhat like Ruby's Logger class # It is included in Cabin::Channel module Cabin::Logger attr_accessor :level @@ -28,9 +29,10 @@ end # def info?, def warn? ... # these methods return true if the loglevel allows that level of log. define_method(predicate) do + @level ||= :info return LEVELS[@level] >= LEVELS[level] end # def info?, def warn? ... end # end defining level-based log methods private