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-1.6.0 lib/bolt/pal/logging.rb
bolt-1.5.0 lib/bolt/pal/logging.rb
bolt-1.4.0 lib/bolt/pal/logging.rb
bolt-1.3.0 lib/bolt/pal/logging.rb
bolt-1.2.0 lib/bolt/pal/logging.rb
bolt-1.1.0 lib/bolt/pal/logging.rb
bolt-1.0.0 lib/bolt/pal/logging.rb
bolt-0.25.0 lib/bolt/pal/logging.rb
bolt-0.24.0 lib/bolt/pal/logging.rb
bolt-0.23.0 lib/bolt/pal/logging.rb
bolt-0.22.0 lib/bolt/pal/logging.rb
bolt-0.21.8 lib/bolt/pal/logging.rb
bolt-0.21.7 lib/bolt/pal/logging.rb
bolt-0.21.6 lib/bolt/pal/logging.rb
bolt-0.21.5 lib/bolt/pal/logging.rb
bolt-0.21.4 lib/bolt/pal/logging.rb