Sha256: 3abb1ba5e0f2d38fe3ddfadf6c0ca433e3006d26629414e657879b25e7dd5398
Contents?: true
Size: 1000 Bytes
Versions: 1
Compression:
Stored size: 1000 Bytes
Contents
module DispatchRider module Logging class Translator class BaseTranslator def initialize(message, **) @message = message end def translate raise NotImplementedError, 'Translators must implement #translate' end private def message_info_fragment(message) { guid: message.guid.to_s, subject: message.subject, body: message_info_arguments(message), } end def message_info_arguments(message) message.body.dup.tap do |m| m.delete('guid') m.delete('object_id') end end def exception_info_fragment(message, exception) exception_details = { exception: { class: exception.class.to_s, message: exception.message, } } message_info_fragment(message).merge exception_details end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dispatch-rider-2.0.0 | lib/dispatch-rider/logging/translator/base_translator.rb |