Sha256: 30415df6ee291c0c707f602d41a3eb1f615796397a5d9c5a5fe8aa5d7b049d5d

Contents?: true

Size: 327 Bytes

Versions: 48

Compression:

Stored size: 327 Bytes

Contents

require "json" unless defined?(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

48 entries across 48 versions & 1 rubygems

Version Path
inspec-core-6.8.11 lib/inspec/utils/json_log.rb
inspec-core-5.22.58 lib/inspec/utils/json_log.rb
inspec-core-5.22.55 lib/inspec/utils/json_log.rb
inspec-core-6.8.1 lib/inspec/utils/json_log.rb
inspec-core-5.22.40 lib/inspec/utils/json_log.rb
inspec-core-6.6.0 lib/inspec/utils/json_log.rb
inspec-core-5.22.36 lib/inspec/utils/json_log.rb
inspec-core-5.22.29 lib/inspec/utils/json_log.rb
inspec-core-4.56.58 lib/inspec/utils/json_log.rb
inspec-core-5.22.3 lib/inspec/utils/json_log.rb
inspec-core-5.21.29 lib/inspec/utils/json_log.rb
inspec-core-5.18.14 lib/inspec/utils/json_log.rb
inspec-core-5.17.4 lib/inspec/utils/json_log.rb
inspec-core-5.14.0 lib/inspec/utils/json_log.rb
inspec-core-4.56.20 lib/inspec/utils/json_log.rb
inspec-core-5.12.2 lib/inspec/utils/json_log.rb
inspec-core-5.10.5 lib/inspec/utils/json_log.rb
inspec-core-4.56.19 lib/inspec/utils/json_log.rb
inspec-core-5.7.9 lib/inspec/utils/json_log.rb
inspec-core-4.56.17 lib/inspec/utils/json_log.rb