Class: Logsly::Outputs::Syslog

Inherits:
Base
  • Object
show all
Defined in:
lib/logsly/outputs.rb

Overview

SYSLOG

Instance Attribute Summary

Attributes inherited from Base

#build

Instance Method Summary collapse

Methods inherited from Base

#initialize, #to_layout

Constructor Details

This class inherits a constructor from Logsly::Outputs::Base

Instance Method Details

#to_appender(*args) ⇒ Object



113
114
115
116
117
118
119
120
121
122
# File 'lib/logsly/outputs.rb', line 113

def to_appender(*args)
  ::Syslog.close if ::Syslog.opened?

  data = SyslogData.new(*args, &self.build)
  Logsly::Logging182.appenders.syslog(data.identity, {
    :logopt   => data.log_opts,
    :facility => data.facility,
    :layout   => self.to_layout(data)
  })
end