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

Version Path
bolt-1.49.0 lib/bolt/catalog/logging.rb
bolt-1.48.0 lib/bolt/catalog/logging.rb
bolt-1.47.0 lib/bolt/catalog/logging.rb
bolt-1.45.0 lib/bolt/catalog/logging.rb
bolt-1.44.0 lib/bolt/catalog/logging.rb
bolt-1.43.0 lib/bolt/catalog/logging.rb
bolt-1.42.0 lib/bolt/catalog/logging.rb
bolt-1.41.0 lib/bolt/catalog/logging.rb
bolt-1.40.0 lib/bolt/catalog/logging.rb
bolt-1.39.0 lib/bolt/catalog/logging.rb
bolt-1.38.0 lib/bolt/catalog/logging.rb
bolt-1.37.0 lib/bolt/catalog/logging.rb
bolt-1.36.0 lib/bolt/catalog/logging.rb
bolt-1.35.0 lib/bolt/catalog/logging.rb
bolt-1.34.0 lib/bolt/catalog/logging.rb
bolt-1.33.0 lib/bolt/catalog/logging.rb
bolt-1.32.0 lib/bolt/catalog/logging.rb
bolt-1.31.1 lib/bolt/catalog/logging.rb
bolt-1.31.0 lib/bolt/catalog/logging.rb
bolt-1.30.1 lib/bolt/catalog/logging.rb