@Override
	public String log(Iterable<LogItem> items) throws Exception
	{
		StringBuilder result = new StringBuilder(2048);
		InputStream in = getClass().getResourceAsStream(PREAMBULE_FILENAME);
		if (in == null)
			throw new Exception(PREAMBULE_FILENAME + " was not found.");
		BufferedReader reader = new BufferedReader(new InputStreamReader(in));
		String line;
		while ((line = reader.readLine()) != null)
		{
			result.append(line);
			result.append('\n');
		}
		reader.close();
		for (LogItem item : items)
		{
			result.append("addInterProduct(" + item.barID);
			result.append(", " + myDblToString(item.quantity));
			int price = (int) item.price;
			result.append(", '" + (price / 100));
			result.append((price < 10 ? ".0" : ".") + (price % 100));
			result.append(");\n");
		}
		return result.toString();
	}