class Gitchefsync::Log::SysLogger
Wrapped sys log Logger Overload all the logger methods - although substitution is not covered
Public Class Methods
new(name)
click to toggle source
TODO: may define syslog open at this point
# File lib/gitchefsync/log.rb, line 24 def initialize(name) begin Syslog.open(name, Syslog::LOG_PID, Syslog::LOG_LOCAL1) rescue Exception => e puts "Syslog error: #{e.message}" end end
Public Instance Methods
debug(*args)
click to toggle source
# File lib/gitchefsync/log.rb, line 33 def debug(*args) log(Syslog::LOG_DEBUG,args[0]) end
error(*args)
click to toggle source
# File lib/gitchefsync/log.rb, line 45 def error(*args) log(Syslog::LOG_ERR,args[0]) end
fatal(*args)
click to toggle source
# File lib/gitchefsync/log.rb, line 49 def fatal(*args) log(Syslog::LOG_EMERG,args[0]) end
info(*args)
click to toggle source
# File lib/gitchefsync/log.rb, line 37 def info(*args) log(Syslog::LOG_INFO,args[0]) end
log( level, msg)
click to toggle source
# File lib/gitchefsync/log.rb, line 53 def log ( level, msg) begin Syslog.log(level, msg) ensure #Syslog.close end end
warn(*args)
click to toggle source
# File lib/gitchefsync/log.rb, line 41 def warn(*args) log(Syslog::LOG_WARNING,args[0]) end