403Webshell
Server IP : 66.29.132.122  /  Your IP : 3.137.183.210
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/hiera/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/hiera/fallback_logger.rb
# Select from a given list of loggers the first one that
# it suitable and use that as the actual logger
#
# @api private
class Hiera::FallbackLogger
  # Chooses the first suitable logger. For all of the loggers that are
  # unsuitable it will issue a warning using the suitable logger stating that
  # the unsuitable logger is not being used.
  #
  # @param implementations [Array<Hiera::Logger>] the implementations to choose from
  # @raises when there are no suitable loggers
  def initialize(*implementations)
    warnings = []
    @implementation = implementations.find do |impl|
      if impl.respond_to?(:suitable?)
        if impl.suitable?
          true
        else
          warnings << "Not using #{impl.name}. It does not report itself to be suitable."
          false
        end
      else
        true
      end
    end

    if @implementation.nil?
      raise "No suitable logging implementation found."
    end

    warnings.each { |message| warn(message) }
  end

  def warn(message)
    @implementation.warn(message)
  end

  def debug(message)
    @implementation.debug(message)
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit