logFile = $config->getBaseDir().'/'.$config->getValue('loggingdir').'/'.$config->getValue('logging.logfile'); if (@file_exists($this->logFile)) { if (!@is_writeable($this->logFile)) throw new Exception("Could not write to logfile: ".$this->logFile); } else { if (!@touch($this->logFile)) throw new Exception("Could not create logfile: ".$this->logFile." Loggingdir is not writeable for the webserver user."); } } function log_internal($level,$string) { if ($this->logFile != null) { $line = sprintf("%s ssp %d %s\n",strftime("%b %d %H:%M:%S"),$level,$string); file_put_contents($this->logFile,$line,FILE_APPEND); } } } ?>