Sha256: bf0a696c1353a72db53a13c27d723e20fcc66a75271a6f6546e206bbef097787

Contents?: true

Size: 368 Bytes

Versions: 6

Compression:

Stored size: 368 Bytes

Contents

# encoding: utf-8
# author: Christoph Hartmann

require 'json'

# a simple streaming json logger
class Logger::JSONFormatter < Logger::Formatter
  def call(severity, time, progname, msg)
    puts JSON.generate(
      {
        'progname'=> progname,
        'severity'=> severity,
        'time'=> time,
        'msg'=> msg,
      },
    )
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
inspec-2.1.81 lib/utils/json_log.rb
inspec-2.1.21 lib/utils/json_log.rb
inspec-2.1.10 lib/utils/json_log.rb
inspec-2.0.32 lib/utils/json_log.rb
inspec-2.0.17 lib/utils/json_log.rb
inspec-1.51.15 lib/utils/json_log.rb