Sha256: 66fded9f469c99afb335ba46d1a9bfa0b04349126b80df45eef52cd98ca66347

Contents?: true

Size: 411 Bytes

Versions: 136

Compression:

Stored size: 411 Bytes

Contents

# frozen_string_literal: true

require 'bolt/util/puppet_log_level'

Puppet::Util::Log.newdesttype :logging do
  match "Logging::Logger"

  # Bolt log levels don't match exactly with Puppet log levels, so we use
  # an explicit mapping.
  def initialize(logger)
    @external_logger = logger
  end

  def handle(log)
    @external_logger.send(Bolt::Util::PuppetLogLevel::MAPPING[log.level], log.to_s)
  end
end

Version data entries

136 entries across 136 versions & 1 rubygems

Version Path
bolt-2.27.0 lib/bolt/pal/logging.rb
bolt-2.26.0 lib/bolt/pal/logging.rb
bolt-2.25.0 lib/bolt/pal/logging.rb
bolt-2.24.1 lib/bolt/pal/logging.rb
bolt-2.24.0 lib/bolt/pal/logging.rb
bolt-2.23.0 lib/bolt/pal/logging.rb
bolt-2.22.0 lib/bolt/pal/logging.rb
bolt-2.21.0 lib/bolt/pal/logging.rb
bolt-2.20.0 lib/bolt/pal/logging.rb
bolt-2.19.0 lib/bolt/pal/logging.rb
bolt-2.18.0 lib/bolt/pal/logging.rb
bolt-2.17.0 lib/bolt/pal/logging.rb
bolt-2.16.0 lib/bolt/pal/logging.rb
bolt-2.15.0 lib/bolt/pal/logging.rb
bolt-2.14.0 lib/bolt/pal/logging.rb
bolt-2.13.0 lib/bolt/pal/logging.rb
bolt-2.12.0 lib/bolt/pal/logging.rb
bolt-2.11.1 lib/bolt/pal/logging.rb
bolt-2.11.0 lib/bolt/pal/logging.rb
bolt-2.10.0 lib/bolt/pal/logging.rb