public function tail($seek)
    {
        // Open the file
        $f = fopen($this->filePath, "rb");

        if (!$seek) {
            // Jump to last character
            fseek($f, -1, SEEK_END);
        } else {
            fseek($f, abs($seek));
        }

        $output = '';

        while (!feof($f)) {
            $output .= fread($f, 4096);
        }

        $pos = ftell($f);

        fclose($f);

        $logs = [];

        foreach ($this->parseLog(trim($output)) as $log) {
            $logs[] = $this->renderTableRow($log);
        }

        return [$pos, $logs];
    }
public function tail($seek)
    {
        // Open the file
        $f = fopen($this->filePath, "rb");

        if (!$seek) {
            // Jump to last character
            fseek($f, -1, SEEK_END);
        } else {
            fseek($f, abs($seek));
        }

        $output = '';

        while (!feof($f)) {
            $output .= fread($f, 4096);
        }

        $pos = ftell($f);

        fclose($f);

        $logs = [];

        foreach ($this->parseLog(trim($output)) as $log) {
            $logs[] = $this->renderTableRow($log);
        }

        return [$pos, $logs];
    }
public function tail ( $ seek ) { // Open the file $ f = fopen ( $ this -> filePath , "rb" ) ; if ( ! $ seek ) { // Jump to last character fseek ( $ f , - 1 , SEEK_END ) ; } else { fseek ( $ f , abs ( $ seek ) ) ; } $ output = '' ; while ( ! feof ( $ f ) ) { $ output .= fread ( $ f , 4096 ) ; } $ pos = ftell ( $ f ) ; fclose ( $ f ) ; $ logs = [ ] ; foreach ( $ this -> parseLog ( trim ( $ output ) ) as $ log ) { $ logs [ ] = $ this -> renderTableRow ( $ log ) ; } return [ $ pos , $ logs ] ; }
Get tail logs in log file.

@param integer $seek

@return array
Get tail logs in log file .