class OhMyLog::SyslogConfiguration

Public Class Methods

change_operation(operation) click to toggle source
# File lib/oh_my_log/syslog_configuration.rb, line 24
def self.change_operation(operation)
  operation = operation.to_s.downcase.to_sym
  raise ArgumentError "Supported mode are: 'split' or 'trim'" unless [:split, :trim].include? operation
  @@split_operation = operation
end
change_processor(processor_name) click to toggle source
# File lib/oh_my_log/syslog_configuration.rb, line 19
def self.change_processor(processor_name)
  raise "We don't support the #{processor_name} format" unless (("SyslogProcessors::#{processor_name.upcase}".constantize) rescue false)
  @@processor_name = processor_name
end
processor_name() click to toggle source
# File lib/oh_my_log/syslog_configuration.rb, line 11
def self.processor_name
  return @@processor_name
end
split_operation() click to toggle source
# File lib/oh_my_log/syslog_configuration.rb, line 15
def self.split_operation
  return @@split_operation
end
use(processor_name = nil, operation = nil) click to toggle source
# File lib/oh_my_log/syslog_configuration.rb, line 6
def self.use(processor_name = nil, operation = nil)
  change_processor(processor_name) if processor_name
  change_operation(operation) if operation
end