<?php

class Log {

	var $filename;
	var $file;
	var $verbosity;

	// Constructor
	function Log($filename, $verbosity) {
		$this->filename = $filename;
		$this->file = fopen($this->filename, "a") or exit("Could not open file");
		$this->verbosity = $verbosity;
	}

	// Adds string to the log file
	function Add($str, $verbosity = 3) {
		//if ($verbosity >= $this->verbosity)
		fwrite($this->file, (date('d.m.y H:i:s').' '.$str."\n"));
	}
}

?>