fishbones/core/Log.php
/**
	 * keep log file
	 * append it to a more permanet one
	 * @return boolean true on sucess, false on error
	 */
keep log file
append it to a more permanet one
@return boolean true on sucess, false on error
keep log file append it to a more permanet one @return boolean true on sucess false on error
public function keepLog() {
		if( ! (Fishbones::getConfig()->debugLog ) ) { 
			return true;
		}
		$file = fopen( Fishbones::getConfig()->currentPathToStart .
			Fishbones::getConfig()->currentPathToFishbones .
			'logs/' .
			$this->keepfilename, 'at' 
		);
		$logCurrentSize = filesize(
				Fishbones::getConfig()->currentPathToStart .
				Fishbones::getConfig()->currentPathToFishbones .
				'logs/' .
				$this->keepfilename
			);
		if( $logCurrentSize > $this->keepMaxSize ) {
			ftruncate( $file, 0 );
		}
		$logtext = file_get_contents(
			Fishbones::getConfig()->currentPathToStart .
			Fishbones::getConfig()->currentPathToFishbones .
			'logs/' .
			$this->filename
		);
		fwrite( $file, "=====================================================================\n" );
		fwrite( $file, $logtext );
		fwrite( $file, "=====================================================================\n" );
		fclose( $file ); 
	}
public function keepLog ( ) { if ( ! ( Fishbones :: getConfig ( ) -> debugLog ) ) { return true ; } $ file = fopen ( Fishbones :: getConfig ( ) -> currentPathToStart . Fishbones :: getConfig ( ) -> currentPathToFishbones . 'logs/' . $ this -> keepfilename , 'at' ) ; $ logCurrentSize = filesize ( Fishbones :: getConfig ( ) -> currentPathToStart . Fishbones :: getConfig ( ) -> currentPathToFishbones . 'logs/' . $ this -> keepfilename ) ; if ( $ logCurrentSize > $ this -> keepMaxSize ) { ftruncate ( $ file , 0 ) ; } $ logtext = file_get_contents ( Fishbones :: getConfig ( ) -> currentPathToStart . Fishbones :: getConfig ( ) -> currentPathToFishbones . 'logs/' . $ this -> filename ) ; fwrite ( $ file , " ===================================================================== \n " ) ; fwrite ( $ file , $ logtext ) ; fwrite ( $ file , " ===================================================================== \n " ) ; fclose ( $ file ) ; }
keep log file
 append it to a more permanet one
 @return boolean true on sucess, false on error
keep log file append it to a more permanet one @return boolean true on sucess false on error