@Override
	public String log(Iterable<LogItem> items) throws Exception
	{
		for (BarItem item : this.items.values())
			item.price = item.quantity = 0;
		for (LogItem item : items)
		{
			BarItem currentItem = this.items.get(item.barID);
			if (currentItem == null)
				throw new Exception("Item not found (ID=" + item.barID + ").");
			currentItem.price += item.price;
			currentItem.quantity += item.quantity;
		}
		URL url = new URL("http://bar.eleves.polytechnique.fr/" + this.bar + "/new-provision/do");
		HttpURLConnection con = (HttpURLConnection) url.openConnection();
		con.setRequestMethod("POST");
		con.setDoOutput(true);
		DataOutputStream wr = new DataOutputStream(con.getOutputStream());
		wr.writeBytes("login=" + this.login + "&p455w0rd=" + this.password + "&provimoney_0=");
		for (Entry<Integer, BarItem> entry : this.items.entrySet())
		{
			int price = (int) entry.getValue().price;
			wr.writeBytes("&provimoney_" + entry.getKey() + "=" +
					(price / 100) + (price < 10 ? ".0" : ".") + (price % 100));
			wr.writeBytes("&proviqty_" + entry.getKey() + "=" + myDblToString(entry.getValue().quantity));
			wr.writeBytes("&proviqtybox_" + entry.getKey() + "=1");
		}
		wr.writeBytes("&btn_provision=Valide ton appro !");
		wr.flush();
		wr.close();
		int responseCode = con.getResponseCode();
		if (responseCode != 200)
			System.out.println("Response: " + responseCode);
		return null;
	}