lib/slf4r/logging_logger.rb in slf4r-0.3.0 vs lib/slf4r/logging_logger.rb in slf4r-0.3.1
- old
+ new
@@ -1,13 +1,13 @@
require 'logging'
require 'slf4r/abstract_logger_facade'
module Slf4r
class LoggerFacade < AbstractLoggerFacade
-
+
attr_reader :logger
-
+
def initialize(name)
super
log_name = nil
name.to_s.split("::").each do |n|
if log_name
@@ -41,12 +41,16 @@
def _error(msg)
log(3, msg)
end
- public
+ def _fatal(msg)
+ log(4, msg)
+ end
+ public
+
def debug?
@logger.level == 0
end
def info?
@@ -57,8 +61,12 @@
@logger.level <= 2
end
def error?
@logger.level <= 3
- end
+ end
+
+ def fatal?
+ @logger.level <= 4
+ end
end
end