Hey Jason,

got the same problem.
I´ve done a small hack see the NEW Part inserted on logrotate.php as
following:


// Re-create the merge table
if(defined('MERGELOGTABLE') || defined('LOGROTATERETENTION')) {
        echo "Getting list of log tables.\n";
        $logTableArray = get_logtables($dbLink);
}

if(defined('LOGROTATERETENTION') && LOGROTATERETENTION) {
        echo "Searching for tables to drop.\n";
        foreach($logTableArray as $value) {
                if(preg_match("([0-9]{8}$)", $value)) {
                        // determine is datestamp is old enough
                        $tableDate = strrev(substr(strrev($value), 0,
8));

                        $cutoffDate = date("Ymd", mktime(0, 0, 0,
date("m"), date("d")-LOGROTATERETENTION, date("Y")));

                        if($cutoffDate > $tableDate) {
                                echo "Dropping ".$value."!\n";
                                $query = "DROP TABLE ".$value;
                                perform_query($query, $dbLink);
                        }
                }
        }
}


//// NEW start
// Re-create the merge table again just in case one table is deleted by
LOGROTATERETENTION
if(defined('MERGELOGTABLE') || defined('LOGROTATERETENTION')) {
        echo "Getting list of log tables.\n";
        $logTableArray = get_logtables($dbLink);
}
//// NEW end

if(defined('MERGELOGTABLE') && MERGELOGTABLE) {
        echo "Creating merge table.\n";
        $query = "SHOW CREATE TABLE ".DEFAULTLOGTABLE;


Greetings
Stefan Wunberg


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Php-syslog-ng-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/php-syslog-ng-support

Reply via email to