lib/semantic_logger/appender/udp.rb in semantic_logger-4.0.0 vs lib/semantic_logger/appender/udp.rb in semantic_logger-4.1.0

- old
+ new

@@ -55,17 +55,14 @@ # Example: # SemanticLogger.add_appender( # appender: :udp, # server: 'server:3300' # ) - def initialize(options = {}, &block) - @socket = nil - options = options.dup - @server = options.delete(:server) - @udp_flags = options.delete(:udp_flags) || 0 - raise(ArgumentError, 'Missing mandatory argument: :server') unless @server + def initialize(server:, udp_flags: 0, level: nil, formatter: nil, filter: nil, application: nil, host: nil, &block) + @server = server + @udp_flags = udp_flags - super(options, &block) + super(level: level, formatter: formatter, filter: filter, application: application, host: host, &block) reopen end # After forking an active process call #reopen to re-open # open the handles to resources