lib/semantic_logger/appender/syslog.rb in semantic_logger-4.1.1 vs lib/semantic_logger/appender/syslog.rb in semantic_logger-4.2.0

- old
+ new

@@ -165,11 +165,11 @@ case @protocol when :syslog ::Syslog.open(application, options, facility) when :tcp # Use the local logger for @remote_syslog so errors with the remote logger can be recorded locally. - @tcp_client_options[:logger] = SemanticLogger::Processor.logger.clone + @tcp_client_options[:logger] = logger @tcp_client_options[:server] = "#{@server}:#{@port}" @remote_syslog = Net::TCPClient.new(@tcp_client_options) when :udp @remote_syslog = UDPSocket.new else @@ -177,11 +177,9 @@ end end # Write the log using the specified protocol and server. def log(log) - return false unless should_log?(log) - case @protocol when :syslog # Since the Ruby Syslog API supports sprintf format strings, double up all existing '%' message = formatter.call(log, self).gsub '%', '%%' ::Syslog.log @level_map[log.level], message