protected static function writeUpdateToken( $tokenFile, $tokenLine )
    {
        $sys = eZSys::instance();
        $updateViewLogPath = $sys->varDirectory() . "/" . eZPerfLoggerINI::variable( 'FileSettings', 'LogDir', 'site.ini' ) . "/" . $tokenFile;
        $dt = new eZDateTime();
        if ( !file_put_contents(
            $updateViewLogPath,
            "# Finished at " . $dt->toString() . "\n" .
            "# Last updated entry:" . "\n" .
            $tokenLine . "\n" ) )
        {
            eZPerfLoggerDebug::writeError( "Could not store last date of perf-log file parsing in $updateViewLogPath, double-counting might occur", __METHOD__ );
        }
    }
protected static function writeUpdateToken( $tokenFile, $tokenLine )
    {
        $sys = eZSys::instance();
        $updateViewLogPath = $sys->varDirectory() . "/" . eZPerfLoggerINI::variable( 'FileSettings', 'LogDir', 'site.ini' ) . "/" . $tokenFile;
        $dt = new eZDateTime();
        if ( !file_put_contents(
            $updateViewLogPath,
            "# Finished at " . $dt->toString() . "\n" .
            "# Last updated entry:" . "\n" .
            $tokenLine . "\n" ) )
        {
            eZPerfLoggerDebug::writeError( "Could not store last date of perf-log file parsing in $updateViewLogPath, double-counting might occur", __METHOD__ );
        }
    }
protected static function writeUpdateToken ( $ tokenFile , $ tokenLine ) { $ sys = eZSys :: instance ( ) ; $ updateViewLogPath = $ sys -> varDirectory ( ) . "/" . eZPerfLoggerINI :: variable ( 'FileSettings' , 'LogDir' , 'site.ini' ) . "/" . $ tokenFile ; $ dt = new eZDateTime ( ) ; if ( ! file_put_contents ( $ updateViewLogPath , "# Finished at " . $ dt -> toString ( ) . "\n" . "# Last updated entry:" . "\n" . $ tokenLine . "\n" ) ) { eZPerfLoggerDebug :: writeError ( "Could not store last date of perf-log file parsing in $updateViewLogPath, double-counting might occur" , __METHOD__ ) ; } }
Writes a "token file"
This is useful whenever there are log files which get parse based on cronjobs
and we have to remember the last line which has been found
Writes a token file This is useful whenever there are log files which get parse based on cronjobs and we have to remember the last line which has been found