Sha256: b7f85c9f4f1156dba516a0987432d9f445ea8b597fb465a79cd7d4b87f5fca58

Contents?: true

Size: 308 Bytes

Versions: 5

Compression:

Stored size: 308 Bytes

Contents

module MessageDriver
  module Logging
    extend self

    def logger
      MessageDriver.logger
    end

    def exception_to_str(e)
      (["#{e.class}: #{e}"] + e.backtrace).join("\n  ")
    end

    def message_with_exception(message, e)
      [message, exception_to_str(e)].join("\n")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
message-driver-0.5.3 lib/message_driver/logging.rb
message-driver-0.5.2 lib/message_driver/logging.rb
message-driver-0.5.1 lib/message_driver/logging.rb
message-driver-0.5.0 lib/message_driver/logging.rb
message-driver-0.4.0 lib/message_driver/logging.rb