Sha256: b5d88b2338ba5cf422dd4d5fd3a7f8a805b84e678bc382c1294155dab17df501

Contents?: true

Size: 313 Bytes

Versions: 1

Compression:

Stored size: 313 Bytes

Contents

module MessageDriver
  module Logging
    extend self

    def 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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
message-driver-0.3.0 lib/message_driver/logging.rb