Class: Backup::Logger::Syslog
- Inherits:
-
Object
- Object
- Backup::Logger::Syslog
- Defined in:
- lib/backup/logger/syslog.rb
Defined Under Namespace
Classes: Options
Instance Method Summary collapse
-
#initialize(options) ⇒ Syslog
constructor
A new instance of Syslog.
-
#log(message) ⇒ Object
Message lines are sent without formatting (timestamp, level), since Syslog will provide it’s own timestamp and priority.
Constructor Details
#initialize(options) ⇒ Syslog
Returns a new instance of Syslog.
101 102 103 |
# File 'lib/backup/logger/syslog.rb', line 101 def initialize() @options = end |
Instance Method Details
#log(message) ⇒ Object
Message lines are sent without formatting (timestamp, level), since Syslog will provide it’s own timestamp and priority.
108 109 110 111 112 113 |
# File 'lib/backup/logger/syslog.rb', line 108 def log() level = @options.send(.level) ::Syslog.open(@options.ident, @options., @options.facility) do |s| .lines.each {|line| s.log(level, '%s', line) } end end |