Module: RemoteSyslogSender

Defined in:
lib/remote_syslog_sender.rb,
lib/remote_syslog_sender/sender.rb,
lib/remote_syslog_sender/tcp_sender.rb,
lib/remote_syslog_sender/udp_sender.rb

Defined Under Namespace

Classes: Sender, TcpSender, UdpSender

Constant Summary collapse

VERSION =
'1.0.3'

Class Method Summary collapse

Class Method Details

.new(remote_hostname, remote_port, options = {}) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/remote_syslog_sender.rb', line 8

def self.new(remote_hostname, remote_port, options = {})
  protocol = options.delete(:protocol)
  if protocol && protocol.to_sym == :tcp
    TcpSender.new(remote_hostname, remote_port, options)
  else
    UdpSender.new(remote_hostname, remote_port, options)
  end
end