Class: Logsly::Outputs::SyslogData

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

Instance Method Summary collapse

Methods inherited from BaseData

#colors, #level, #pattern, #to_pattern_opts

Constructor Details

#initialize(*args, &build) ⇒ SyslogData

Returns a new instance of SyslogData.



144
145
146
147
148
# File 'lib/logsly/outputs.rb', line 144

def initialize(*args, &build)
  @log_opts = (::Syslog::LOG_PID | ::Syslog::LOG_CONS)
  @facility = ::Syslog::LOG_LOCAL0
  super
end

Instance Method Details

#facility(value = nil) ⇒ Object



160
161
162
163
# File 'lib/logsly/outputs.rb', line 160

def facility(value = nil)
  @facility = value if !value.nil?
  @facility
end

#identity(value = nil) ⇒ Object



150
151
152
153
# File 'lib/logsly/outputs.rb', line 150

def identity(value = nil)
  @identity = value if !value.nil?
  @identity
end

#log_opts(value = nil) ⇒ Object



155
156
157
158
# File 'lib/logsly/outputs.rb', line 155

def log_opts(value = nil)
  @log_opts = value if !value.nil?
  @log_opts
end