lib/syslogstash/logstash_writer.rb in syslogstash-0.4.1 vs lib/syslogstash/logstash_writer.rb in syslogstash-1.0.0
- old
+ new
@@ -60,10 +60,10 @@
# If we got here, we sent successfully, so we don't want
# to put the entry back on the queue in the ensure block
entry = nil
rescue StandardError => ex
- $stderr.puts "Unhandled exception: #{ex.message} (#{ex.class})"
+ log { "Unhandled exception: #{ex.message} (#{ex.class})" }
$stderr.puts ex.backtrace.map { |l| " #{l}" }.join("\n")
ensure
@entries_mutex.synchronize { @entries.unshift if entry }
end
end