From dad6339add8bd0065d5ad2b2479cd74276dcceb9 Mon Sep 17 00:00:00 2001 From: Robert Peralta Date: Tue, 24 Nov 2020 11:34:33 -0400 Subject: [PATCH] Allow custom logger class based on https://github.com/papertrail/remote_syslog_logger/issues/29 --- lib/remote_syslog_logger.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/remote_syslog_logger.rb b/lib/remote_syslog_logger.rb index 06cb6e8..e8763a4 100644 --- a/lib/remote_syslog_logger.rb +++ b/lib/remote_syslog_logger.rb @@ -3,9 +3,10 @@ require 'logger' module RemoteSyslogLogger - VERSION = '1.0.4' + VERSION = '1.0.5' def self.new(remote_hostname, remote_port, options = {}) - Logger.new(RemoteSyslogLogger::UdpSender.new(remote_hostname, remote_port, options)) + logger_class = options[:logger_class] || Logger + logger_class.new(RemoteSyslogLogger::UdpSender.new(remote_hostname, remote_port, options)) end end