Sha256: a9a9f53cc18d147f83e1560b1741dc20df7cfcd9cf700af936e61f15d4eb2ab4

Contents?: true

Size: 426 Bytes

Versions: 17

Compression:

Stored size: 426 Bytes

Contents

# frozen_string_literal: true

require_relative '../../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

17 entries across 17 versions & 1 rubygems

Version Path
bolt-3.29.0 lib/bolt/pal/logging.rb
bolt-3.28.0 lib/bolt/pal/logging.rb
bolt-3.27.4 lib/bolt/pal/logging.rb
bolt-3.27.2 lib/bolt/pal/logging.rb
bolt-3.27.1 lib/bolt/pal/logging.rb
bolt-3.26.2 lib/bolt/pal/logging.rb
bolt-3.26.1 lib/bolt/pal/logging.rb
bolt-3.25.0 lib/bolt/pal/logging.rb
bolt-3.24.0 lib/bolt/pal/logging.rb
bolt-3.23.1 lib/bolt/pal/logging.rb
bolt-3.23.0 lib/bolt/pal/logging.rb
bolt-3.22.1 lib/bolt/pal/logging.rb
bolt-3.22.0 lib/bolt/pal/logging.rb
bolt-3.21.0 lib/bolt/pal/logging.rb
bolt-3.20.0 lib/bolt/pal/logging.rb
bolt-3.19.0 lib/bolt/pal/logging.rb
bolt-3.18.0 lib/bolt/pal/logging.rb