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-3.17.0 lib/bolt/pal/logging.rb
bolt-3.16.1 lib/bolt/pal/logging.rb
bolt-3.16.0 lib/bolt/pal/logging.rb
bolt-3.15.0 lib/bolt/pal/logging.rb
bolt-3.14.1 lib/bolt/pal/logging.rb
bolt-3.13.0 lib/bolt/pal/logging.rb
bolt-3.12.0 lib/bolt/pal/logging.rb
bolt-3.11.0 lib/bolt/pal/logging.rb
bolt-3.10.0 lib/bolt/pal/logging.rb
bolt-3.9.2 lib/bolt/pal/logging.rb
bolt-3.9.1 lib/bolt/pal/logging.rb
bolt-3.9.0 lib/bolt/pal/logging.rb
bolt-3.8.1 lib/bolt/pal/logging.rb
bolt-3.8.0 lib/bolt/pal/logging.rb
bolt-3.7.1 lib/bolt/pal/logging.rb
bolt-3.7.0 lib/bolt/pal/logging.rb
bolt-3.6.1 lib/bolt/pal/logging.rb
bolt-3.6.0 lib/bolt/pal/logging.rb
bolt-3.5.0 lib/bolt/pal/logging.rb
bolt-3.4.0 lib/bolt/pal/logging.rb