Sha256: b9ba6b3dec8abdf4db78e8d440efc5429adfd0d95a3065059dc034b7ce1a4c90
Contents?: true
Size: 1.09 KB
Versions: 8
Compression:
Stored size: 1.09 KB
Contents
require 'logatron/contexts' require 'logatron/configuration' module Logatron module Formatting def milliseconds_elapsed(finish, start) (finish - start) * 1000.0 end def format_log(msg: '-', status: '-', duration: '-', request: '-', inputs: '-', severity: '-') Logatron.configuration.transformer.call({ timestamp: Time.now.iso8601, severity: severity, host: Logatron.configuration.host, id: Contexts.msg_id, site: Contexts.site, status: status, duration: duration, request: request, source: inputs, body: msg }) + "\n" end end end
Version data entries
8 entries across 8 versions & 1 rubygems