fishbones/core/Log.php
/**
	 * write text to log file
	 * 
	 * @param $tex string writes string into log file
	 * @return boolean true on sucess, false on error
	 */
write text to log file

@param $tex string writes string into log file
@return boolean true on sucess, false on error
write text to log file @param $tex string writes string into log file @return boolean true on sucess false on error
public function write( $text ) {
		if( ! (Fishbones::getConfig()->debugLog ) ) { 
			return true;
		}
		if( !$this->file ) {
			$this->openLogFile();
		}
		if ( !$this->file ) {
			$this->error = "<error>error opening log file</error>\n";
			return false;
		}
		$markedText = "------------------------------------------------------------------\n";
		$markedText .= date('d/m/Y   H:i:s')."   ". $_SERVER['SCRIPT_NAME']."\n";
		$markedText .= $text."\n" ;
		$write = fwrite( $this->file, $markedText, 2000 );
		if ( !$write ) {
			$this->error = "<error>error writing log file</error>\n";
			return false;
		}
		return true;
	}
public function write ( $ text ) { if ( ! ( Fishbones :: getConfig ( ) -> debugLog ) ) { return true ; } if ( ! $ this -> file ) { $ this -> openLogFile ( ) ; } if ( ! $ this -> file ) { $ this -> error = " <error>error opening log file</error> \n " ; return false ; } $ markedText = " ------------------------------------------------------------------ \n " ; $ markedText .= date ( 'd/m/Y   H:i:s' ) . " " . $ _SERVER [ 'SCRIPT_NAME' ] . " \n " ; $ markedText .= $ text . " \n " ; $ write = fwrite ( $ this -> file , $ markedText , 2000 ) ; if ( ! $ write ) { $ this -> error = " <error>error writing log file</error> \n " ; return false ; } return true ; }
write text to log file
write text to log file