<?php
/*
 * DON'T REMOVE THE FOLLOWING LICENSE
 *           INFORMATION!
 * ----------------------------------
 * Copyright by
 * Dennis Ritz
 * Author: Dennis Ritz
 * dennis.ritz@gmx.net
 * 2007-2008
 * ----------------------------------
 */

class Log {
	
	public function __construct() {
		
	}

	private static function _writeToLogFile($p_msg) {
		$myFile = ROOT_DIR."/errorLog.txt";
		$fh = fopen($myFile, 'a');
		fwrite($fh, $p_msg);
		$stringData = "";
		fwrite($fh, $stringData."\r\n");
		fclose($fh);
	}
	
	public static function notice($p_file,$p_line,$p_msg) {
		self::_writeToLogFile("NOTICE [$p_file:$p_line] ".$p_msg);
	}
	
	public static function warning($p_file,$p_line,$p_msg) {
		self::_writeToLogFile("WARNING [$p_file:$p_line] ".$p_msg);
	}
	
	public static function error($p_file,$p_line,$p_msg) {
		self::_writeToLogFile("ERROR [$p_file:$p_line] ".$p_msg);
	}
}
?>