Class: Rootage::SyslogLogger
Overview
SyslogLogger
is a logger using syslog("syslog-logger" gem).
Instance Method Summary collapse
- #debug(msg, pos = caller(1).first, pid = Process.pid) ⇒ Object
- #error(msg, pos = caller(1).first, pid = Process.pid) ⇒ Object
- #fatal(msg, pos = caller(1).first, pid = Process.pid) ⇒ Object
- #info(msg, pos = caller(1).first, pid = Process.pid) ⇒ Object
-
#initialize ⇒ SyslogLogger
constructor
A new instance of SyslogLogger.
- #level=(lv) ⇒ Object
- #queued? ⇒ Boolean
- #terminate ⇒ Object
- #warn(msg, pos = caller(1).first, pid = Process.pid) ⇒ Object
Methods inherited from Logger
Constructor Details
#initialize ⇒ SyslogLogger
Returns a new instance of SyslogLogger.
191 192 193 |
# File 'lib/rootage/log.rb', line 191 def initialize @logger = ::Logger::Syslog.new('pione') end |
Instance Method Details
#debug(msg, pos = caller(1).first, pid = Process.pid) ⇒ Object
208 |
# File 'lib/rootage/log.rb', line 208 def debug(msg, pos=caller(1).first, pid=Process.pid); @logger.debug(msg); end |
#error(msg, pos = caller(1).first, pid = Process.pid) ⇒ Object
205 |
# File 'lib/rootage/log.rb', line 205 def error(msg, pos=caller(1).first, pid=Process.pid); @logger.error(msg); end |
#fatal(msg, pos = caller(1).first, pid = Process.pid) ⇒ Object
204 |
# File 'lib/rootage/log.rb', line 204 def fatal(msg, pos=caller(1).first, pid=Process.pid); @logger.fatal(msg); end |
#info(msg, pos = caller(1).first, pid = Process.pid) ⇒ Object
207 |
# File 'lib/rootage/log.rb', line 207 def info (msg, pos=caller(1).first, pid=Process.pid); @logger.info(msg) ; end |
#level=(lv) ⇒ Object
195 196 197 198 199 200 201 202 |
# File 'lib/rootage/log.rb', line 195 def level=(lv) case lv when :fatal, :error, :warn, :info, :debug @logger.level = lv else raise UnknownLogLevel.new(self.class, :level=, lv) end end |
#queued? ⇒ Boolean
214 215 216 |
# File 'lib/rootage/log.rb', line 214 def queued? false end |
#terminate ⇒ Object
210 211 212 |
# File 'lib/rootage/log.rb', line 210 def terminate # ignore end |
#warn(msg, pos = caller(1).first, pid = Process.pid) ⇒ Object
206 |
# File 'lib/rootage/log.rb', line 206 def warn (msg, pos=caller(1).first, pid=Process.pid); @logger.warn(msg) ; end |