Sha256: 59cd44a88ee123835430466237f77600c7c3b625725cac15c815c51ca79012f0
Contents?: true
Size: 670 Bytes
Versions: 11
Compression:
Stored size: 670 Bytes
Contents
# frozen_string_literal: true module Cloudenvoy # Logger configuration for subscribers class SubscriberLogger < LoggerWrapper # # The subscriber default context processor. # # @return [Proc] The context processor proc. # def self.default_context_processor @default_context_processor ||= ->(loggable) { loggable.message.to_h.slice(:id, :metadata, :topic) } end # # Format main log message. # # @param [String] msg The message to log. # # @return [String] The formatted log message # def formatted_message(msg) "[Cloudenvoy][#{loggable.class}][#{loggable.message.id}] #{msg}" end end end
Version data entries
11 entries across 11 versions & 1 rubygems