class Backup::Logger::Syslog::Options
Attributes
Enables logging to the system’s Syslog
compatible logger.
This may also be enabled using --syslog
on the command line.
If --no-syslog
is used on the command line, this will be disabled and any settings here will be ignored.
@param [Boolean, nil] @return [Boolean, nil] Default: false
Specify the priority level to be used for :error
messages.
See the Ruby Standard Library documentation for Syslog
for more info. rdoc.info/stdlib/syslog/Syslog.log
@param [Integer] @return [Integer] Default: Syslog::LOG_ERR
Specify the facility to be used with Syslog
.
See the Ruby Standard Library documentation for Syslog
for more info. rdoc.info/stdlib/syslog/Syslog.open
Note that setting this to nil
will cause this to default to a setting of Syslog::LOG_USER
@param [Integer] @return [Integer] Default: Syslog::LOG_LOCAL0
Specify the identification string to be used with Syslog
.
@param [String] @return [String] Default: ‘backup’
Specify the priority level to be used for :info
messages.
See the Ruby Standard Library documentation for Syslog
for more info. rdoc.info/stdlib/syslog/Syslog.log
@param [Integer] @return [Integer] Default: Syslog::LOG_INFO
Specify the options to be used with Syslog
.
See the Ruby Standard Library documentation for Syslog
for more info. rdoc.info/stdlib/syslog/Syslog.open
Note that setting this to nil
will cause this to default to a setting of +Syslog::LOG_PID | Syslog::LOG_CONS+
@param [Integer] @return [Integer] Default: Syslog::LOG_PID
Specify the priority level to be used for :warn
messages.
See the Ruby Standard Library documentation for Syslog
for more info. rdoc.info/stdlib/syslog/Syslog.log
@param [Integer] @return [Integer] Default: Syslog::LOG_WARNING
Public Class Methods
# File lib/backup/logger/syslog.rb, line 80 def initialize @enabled = false @ident = "backup" @options = ::Syslog::LOG_PID @facility = ::Syslog::LOG_LOCAL0 @info = ::Syslog::LOG_INFO @warn = ::Syslog::LOG_WARNING @error = ::Syslog::LOG_ERR end
Public Instance Methods
# File lib/backup/logger/syslog.rb, line 94 def enabled=(val) @enabled = val unless enabled.nil? end
# File lib/backup/logger/syslog.rb, line 90 def enabled? !!enabled end