_filename = $filename; $fp = fopen($this->_filename,"a"); if(!$fp) { trigger_error("Logger cannot append to log file: ".$this->filename,E_USER_WARNING); } if($fp) { fclose($fp); } } /** * Adds content to log file * * @param string $event Event that triggered the notify action * @param string $msg Message about the event * @access public * @return void */ function notify($event,$msg) { // Add a line to the log file. $fp = fopen($this->_filename,"a"); $date = date("[d/m/Y h:i:s]"); $msg=trim($msg); fputs($fp,$date." ".$msg."\n"); fclose($fp); } } ?>