require 'active_support/tagged_logging' module Hickory module Formatters class Simple < ::Logger::Formatter include ActiveSupport::TaggedLogging::Formatter def call(severity, time, progname, msg) message = msg.delete(:message) metadata = msg.map {|k,v| "#{k}=#{v}" } message.prepend "#{tags_text}" unless current_tags.empty? message << " #{metadata.join(' ')}" unless metadata.empty? "#{message}\n" end end end end