From 0ecb92103580b80505479dfa8694050de71b660f Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Thu, 19 Dec 2013 09:36:16 +0100 Subject: [PATCH] [IMPROVED] Debug logging for purgeArchive calls --- cronjobs/archive_cleanup.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cronjobs/archive_cleanup.php b/cronjobs/archive_cleanup.php index c65d8006..4d7b011b 100755 --- a/cronjobs/archive_cleanup.php +++ b/cronjobs/archive_cleanup.php @@ -26,9 +26,11 @@ chdir(dirname(__FILE__)); require_once('shared.inc.php'); // If we don't keep archives, delete some now to release disk space -if (!$share->purgeArchive()) { +if (!$affected_rows = $share->purgeArchive()) { $log->logError("Failed to delete archived shares, not critical but should be checked: " . $share->getCronError()); $monitoring->endCronjob($cron_name, 'E0008', 1, true); +} else { + $log->logDebug("Deleted $affected_rows archived shares this run"); } // Cron cleanup and monitoring