class SemanticLogger::Formatters::Json

Public Class Methods

new(time_format: :iso_8601, time_key: :timestamp, **args) click to toggle source

Default JSON time format is ISO8601

Calls superclass method
# File lib/semantic_logger/formatters/json.rb, line 6
def initialize(time_format: :iso_8601, time_key: :timestamp, **args)
  super(time_format: time_format, time_key: time_key, **args)
end

Public Instance Methods

call(log, logger) click to toggle source

Returns log messages in JSON format

Calls superclass method
# File lib/semantic_logger/formatters/json.rb, line 11
def call(log, logger)
  super(log, logger).to_json
end