Sha256: e415f961dfdc45122400b56125e3fa2c2c792333011c776811ef4667c51471e2
Contents?: true
Size: 592 Bytes
Versions: 17
Compression:
Stored size: 592 Bytes
Contents
# frozen_string_literal: true require 'logger' require 'multi_json' module EIVO class Formatter < ::Logger::Formatter def call(severity, timestamp, progname, message) json = { pid: $PROCESS_ID, level: severity, timestamp: timestamp.utc.iso8601(3), message: message } if progname json[:tag] = progname end if defined?(::Sidekiq) context = ::Sidekiq::Context.current if !context.empty? json[:context] = context end end MultiJson.dump(json) << "\n" end end end
Version data entries
17 entries across 17 versions & 2 rubygems