Module: RemoteSyslogLogger
- Defined in:
- lib/remote_syslog_logger.rb,
lib/remote_syslog_logger/sender.rb,
lib/remote_syslog_logger/tcp_sender.rb,
lib/remote_syslog_logger/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
9 10 11 12 13 14 15 16 |
# File 'lib/remote_syslog_logger.rb', line 9 def self.new(remote_hostname, remote_port, = {}) protocol = .delete(:protocol) if protocol && protocol.to_sym == :tcp Logger.new(TcpSender.new(remote_hostname, remote_port, )) else Logger.new(UdpSender.new(remote_hostname, remote_port, )) end end |