class Slogger::Logger
The wrapper for standard Ruby Syslog library.
Sample:
slogger = Slogger::Logger.new
“sample_app”, :info, :local0 slogger.info “A good info” slogger.debug “A deep info (oops! it'll not be logged)”
Constants
- FACILITIES
- SEVERITIES
Just sugars
Public Class Methods
new(app_name, severity, facility)
click to toggle source
To build a Slogger::Logger
instance.
app_name
-
The appliaction name to be logged
severity
-
The log severity: :emerg, :alert, :crit, :err, :warning, :notice,
:info, or :debug. It can be changed at anytime.
facility
-
A typical syslog facility: :kernel, :user, :mail, :daemon, :auth,
:syslog, :lpr, :news, :uucp, :cron, :authpriv, :ftp, :local0, :local1, :local2, :local3, :local4, :local5, :local6, or :local7
Raises an ArgumentError if app_name, severity, or facility is nil.
Calls superclass method
Slogger::Base::new
# File lib/slogger/logger.rb, line 32 def initialize(app_name, severity, facility) super app_name, severity, facility end