lib/lager.rb in lager-1.1.2.1 vs lib/lager.rb in lager-1.1.3.1
- old
+ new
@@ -52,19 +52,19 @@
}
self.log_level = level
dest # don't expose @lager here
end
- # call without argument to get the log level
- # call with argument to set the log level
- # :debug, 'debug', and Logger::DEBUG (0) are all supported
+ # returns a symbol e.g. :debug -- possibly :unknown
#
def log_level
raise "no @lager available" unless defined?(@lager)
[:debug, :info, :warn, :error, :fatal][@lager.level] || :unknown
end
+ # :debug, 'debug', and Logger::DEBUG (0) are all supported
+ #
def log_level=(level)
raise "no @lager available" unless defined?(@lager)
case level
when Symbol, String
begin
@@ -85,9 +85,9 @@
# provide access to the class instance variable
# typically only used within initialize
#
def lager
- log_to unless defined?(@lager)
+ raise "no @lager available" unless defined?(@lager)
@lager
end
end