lib/message_driver/logging.rb in message-driver-0.2.2 vs lib/message_driver/logging.rb in message-driver-0.3.0
- old
+ new
@@ -1,11 +1,17 @@
module MessageDriver
module Logging
+ extend self
+
def logger
- MessageDriver::Broker.logger
+ MessageDriver.logger
end
def exception_to_str(e)
(["#{e.class}: #{e.to_s}"] + e.backtrace).join("\n ")
+ end
+
+ def message_with_exception(message, e)
+ [message, exception_to_str(e)].join("\n")
end
end
end