Sha256: 554a4208c54980b75003e05feaa08e91013070c565410dab65b5e5d987f2e505
Contents?: true
Size: 490 Bytes
Versions: 1
Compression:
Stored size: 490 Bytes
Contents
require 'json' module SemanticLogger module Formatters class Json < Raw # Default JSON time format is ISO8601 def initialize(time_format: :iso_8601, log_host: true, log_application: true, time_key: :timestamp) super(time_format: time_format, log_host: log_host, log_application: log_application, time_key: time_key) end # Returns log messages in JSON format def call(log, logger) super(log, logger).to_json end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
semantic_logger-4.2.0 | lib/semantic_logger/formatters/json.rb |