class Rootage::RubyStandardLogger
‘RubyStandardLogger` is a logger using Ruby standard Logger
.
Public Class Methods
new(out = $stdout)
click to toggle source
# File lib/rootage/log.rb, line 134 def initialize(out = $stdout) @logger = ::Logger.new(out) end
Public Instance Methods
debug(msg, pos=caller(1).first, pid=Process.pid)
click to toggle source
# File lib/rootage/log.rb, line 176 def debug(msg, pos=caller(1).first, pid=Process.pid); @logger.debug(msg); end
error(msg, pos=caller(1).first, pid=Process.pid)
click to toggle source
# File lib/rootage/log.rb, line 173 def error(msg, pos=caller(1).first, pid=Process.pid); @logger.error(msg); end
fatal(msg, pos=caller(1).first, pid=Process.pid)
click to toggle source
# File lib/rootage/log.rb, line 172 def fatal(msg, pos=caller(1).first, pid=Process.pid); @logger.fatal(msg); end
info(msg, pos=caller(1).first, pid=Process.pid)
click to toggle source
# File lib/rootage/log.rb, line 175 def info (msg, pos=caller(1).first, pid=Process.pid); @logger.info(msg) ; end
level()
click to toggle source
# File lib/rootage/log.rb, line 138 def level case @logger.level when ::Logger::FATAL :fatal when ::Logger::ERROR :error when ::Logger::WARN :warn when ::Logger::INFO :info when ::Logger::DEBUG :debug else raise UnknownLogLevel.new(self.class, :level, @logger.level) end end
level=(lv)
click to toggle source
# File lib/rootage/log.rb, line 155 def level=(lv) case lv when :fatal @logger.level = ::Logger::FATAL when :error @logger.level = ::Logger::ERROR when :warn @logger.level = ::Logger::WARN when :info @logger.level = ::Logger::INFO when :debug @logger.level = ::Logger::DEBUG else raise UnknownLogLevel.new(self.class, :level=, lv) end end
queued?()
click to toggle source
# File lib/rootage/log.rb, line 182 def queued? false end
terminate()
click to toggle source
# File lib/rootage/log.rb, line 178 def terminate # ignore end
warn(msg, pos=caller(1).first, pid=Process.pid)
click to toggle source
# File lib/rootage/log.rb, line 174 def warn (msg, pos=caller(1).first, pid=Process.pid); @logger.warn(msg) ; end