Skip to content

Commit

Permalink
Allow custom logger class based on papertrail#29
Browse files Browse the repository at this point in the history
  • Loading branch information
rapito committed Nov 24, 2020
1 parent 506bba0 commit dad6339
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/remote_syslog_logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit dad6339

Please sign in to comment.