lib/amqp/exceptions.rb in amqp-0.9.7 vs lib/amqp/exceptions.rb in amqp-0.9.8

- old
+ new

@@ -41,11 +41,20 @@ attr_reader :settings def initialize(settings) @settings = settings - super("AMQP broker closed TCP connection before authentication succeeded: this usually means authentication failure due to misconfiguration. Settings are #{settings.inspect}") + super("AMQP broker closed TCP connection before authentication succeeded: this usually means authentication failure due to misconfiguration. Settings are #{filtered_settings.inspect}") end # initialize(settings) + + def filtered_settings + filtered_settings = settings.dup + [:pass, :password].each do |sensitve_setting| + filtered_settings[sensitve_setting] &&= '[filtered]' + end + + filtered_settings + end end # PossibleAuthenticationFailureError # Raised when queue (or exchange) declaration fails because another queue with the same