Sha256: a1d25659e7b278f6342adb5f5a5f00dd91b70d73670f509ca5fdc470325dd3c3
Contents?: true
Size: 425 Bytes
Versions: 64
Compression:
Stored size: 425 Bytes
Contents
# frozen_string_literal: true Puppet::Util::Log.newdesttype :stderr do def initialize # Flush output immediately. $stderr.sync = true end # Emits message as a single line of JSON mapping level to message string. def handle(msg) str = msg.respond_to?(:multiline) ? msg.multiline : msg.to_s str = msg.source == "Puppet" ? str : "#{msg.source}: #{str}" warn({ msg.level => str }.to_json) end end
Version data entries
64 entries across 64 versions & 1 rubygems