Server IP : 104.21.14.103 / Your IP : 18.118.184.91 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/hiera/ |
Upload File : |
# 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