class RailsJsonLogger::Formatter

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/rails_json_logger/formatter.rb, line 3
def initialize
  super(time_format: :iso_8601, log_host: false, log_application: false, time_key: :timestamp)
end

Public Instance Methods

duration() click to toggle source
# File lib/rails_json_logger/formatter.rb, line 12
def duration
  # skip :duration as duration_human
  hash[:duration] = log.duration if log.duration
end
level() click to toggle source
# File lib/rails_json_logger/formatter.rb, line 7
def level
  # skip :level_index
  hash[:level] = log.level
end