Parent

Methods

Files

Class/Module Index [+]

Quicksearch

God::SysLogger

Constants

SYMBOL_EQUIVALENTS

Public Class Methods

level=(level) click to toggle source

Set the log level

+level+ is the Symbol level to set as maximum. One of:
        [:fatal | :error | :warn | :info | :debug ]

Returns Nothing

# File lib/god/sys_logger.rb, line 27
def self.level=(level)
  Syslog.mask = Syslog::LOG_UPTO(SYMBOL_EQUIVALENTS[level])
end
log(level, text) click to toggle source

Log a message to syslog.

+level+ is the Symbol level of the message. One of:
        [:fatal | :error | :warn | :info | :debug ]
+text+ is the String text of the message

Returns Nothing

# File lib/god/sys_logger.rb, line 37
def self.log(level, text)
  Syslog.log(SYMBOL_EQUIVALENTS[level], '%s', text)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.