From 3a63fa1efbd678d0f3db350b1f1dd0c996485edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no> Date: Thu, 18 Jun 2009 06:25:03 +0000 Subject: [PATCH] Log instead of sending email when aggregator output was empty.. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1526 44740490-163a-0410-bde0-09ae8108e29a --- modules/statistics/hooks/hook_cron.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/statistics/hooks/hook_cron.php b/modules/statistics/hooks/hook_cron.php index 1c4d43adc..c97141feb 100644 --- a/modules/statistics/hooks/hook_cron.php +++ b/modules/statistics/hooks/hook_cron.php @@ -23,12 +23,14 @@ function statistics_hook_cron(&$croninfo) { $aggregator = new sspmod_statistics_Aggregator(); $results = $aggregator->aggregate(); if (empty($results)) { - $croninfo['summary'][] = 'Output from statistics aggregator was empty.'; + SimpleSAML_Logger::notice('Output from statistics aggregator was empty.'); } else { $aggregator->store($results); } } catch (Exception $e) { - $croninfo['summary'][] = 'Loganalyzer threw exception: ' . $e->getMessage(); + $message = 'Loganalyzer threw exception: ' . $e->getMessage(); + SimpleSAML_Logger::warning($message); + $croninfo['summary'][] = $message; } } ?> \ No newline at end of file -- GitLab