lib/rubydns/server.rb in rubydns-0.5.2 vs lib/rubydns/server.rb in rubydns-0.5.3
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright (c) 2009, 2011 Samuel G. D. Williams. <http://www.oriontransfer.co.nz>
+# Copyright, 2009, 2012, by Samuel G. D. Williams. <http://www.codeotaku.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -17,10 +17,11 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
require 'rubydns/transaction'
+require 'rubydns/extensions/logger'
module RubyDNS
# This class provides the core of the DSL. It contains a list of rules which
# are used to match against incoming DNS questions. These rules are used to
@@ -211,13 +212,10 @@
# If there was an error, log it and fail:
transaction.errback do |response|
if Exception === response
@logger.error "Exception thrown while processing #{transaction}!"
- @logger.error "#{response.class}: #{response.message}"
- if response.backtrace
- Array(response.backtrace).each { |at| @logger.error at }
- end
+ RubyDNS.log_exception(@logger, response)
else
@logger.error "Failure while processing #{transaction}!"
@logger.error "#{response.inspect}"
end