# File lib/puppet/util/log.rb, line 125 125: def Log.create(hash) 126: unless hash.include?(:level) 127: raise Puppet::DevError, "Logs require a level" 128: end 129: unless @levels.index(hash[:level]) 130: raise Puppet::DevError, "Invalid log level %s" % hash[:level] 131: end 132: if @levels.index(hash[:level]) >= @loglevel 133: return Puppet::Util::Log.new(hash) 134: else 135: return nil 136: end 137: end