Skip to content
Snippets Groups Projects
Commit 3a63fa1e authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

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
parent 83cf0e3a
No related branches found
No related tags found
No related merge requests found
...@@ -23,12 +23,14 @@ function statistics_hook_cron(&$croninfo) { ...@@ -23,12 +23,14 @@ function statistics_hook_cron(&$croninfo) {
$aggregator = new sspmod_statistics_Aggregator(); $aggregator = new sspmod_statistics_Aggregator();
$results = $aggregator->aggregate(); $results = $aggregator->aggregate();
if (empty($results)) { if (empty($results)) {
$croninfo['summary'][] = 'Output from statistics aggregator was empty.'; SimpleSAML_Logger::notice('Output from statistics aggregator was empty.');
} else { } else {
$aggregator->store($results); $aggregator->store($results);
} }
} catch (Exception $e) { } 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment