Commit 1d68ffca authored by Robert Lyon's avatar Robert Lyon Committed by Cecilia Vela Gurovic
Browse files

Bug 1754237: Switching SimpleSAMLphp logger call to namesapced way



behatnotneeded

Change-Id: I7015e84895533aa3ae338da27c872d0d00b97b84
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 6c92987c
......@@ -152,7 +152,7 @@ $config = array (
* Options: [syslog,file,errorlog]
*
*/
'logging.level' => !get_config('productionmode') ? SimpleSAML_Logger::DEBUG : SimpleSAML_Logger::ERR,
'logging.level' => !get_config('productionmode') ? SimpleSAML\Logger::DEBUG : SimpleSAML\Logger::ERR,
'logging.handler' => 'errorlog',
/*
......
......@@ -32,7 +32,7 @@ class sspmod_memcached_Store_Memcached
*/
public static function get($key)
{
SimpleSAML_Logger::debug("loading key $key from memcache");
SimpleSAML\Logger::debug("loading key $key from memcache");
$latestInfo = null;
$latestTime = 0.0;
$latestData = null;
......@@ -59,19 +59,19 @@ class sspmod_memcached_Store_Memcached
* - 'data': The data.
*/
if (!is_array($info)) {
SimpleSAML_Logger::warning(
SimpleSAML\Logger::warning(
'Retrieved invalid data from a memcache server. Data was not an array.'
);
continue;
}
if (!array_key_exists('timestamp', $info)) {
SimpleSAML_Logger::warning(
SimpleSAML\Logger::warning(
'Retrieved invalid data from a memcache server. Missing timestamp.'
);
continue;
}
if (!array_key_exists('data', $info)) {
SimpleSAML_Logger::warning(
SimpleSAML\Logger::warning(
'Retrieved invalid data from a memcache server. Missing data.'
);
continue;
......@@ -103,12 +103,12 @@ class sspmod_memcached_Store_Memcached
throw new SimpleSAML_Error_Exception('All memcache servers are down', 503, $e);
}
// we didn't find any data matching the key
SimpleSAML_Logger::debug("key $key not found in memcache");
SimpleSAML\Logger::debug("key $key not found in memcache");
return null;
}
if ($mustUpdate) {
// we found data matching the key, but some of the servers need updating
SimpleSAML_Logger::debug("Memcache servers out of sync for $key, forcing sync");
SimpleSAML\Logger::debug("Memcache servers out of sync for $key, forcing sync");
self::set($key, $latestData);
}
return $latestData;
......@@ -122,7 +122,7 @@ class sspmod_memcached_Store_Memcached
*/
public static function set($key, $value, $expire = null)
{
SimpleSAML_Logger::debug("saving key $key to memcache");
SimpleSAML\Logger::debug("saving key $key to memcache");
$savedInfo = array(
'timestamp' => microtime(true),
'data' => $value
......@@ -145,7 +145,7 @@ class sspmod_memcached_Store_Memcached
public static function delete($key)
{
assert('is_string($key)');
SimpleSAML_Logger::debug("deleting key $key from memcache");
SimpleSAML\Logger::debug("deleting key $key from memcache");
// store this object to all groups of memcache servers
foreach (self::getMemcacheServers() as $server) {
$server->delete($key);
......
......@@ -1539,7 +1539,7 @@ class Metarefresh {
foreach ($sets AS $setkey => $set) {
SimpleSAML_Logger::info('Mahara [metarefresh]: Executing set [' . $setkey . ']');
SimpleSAML\Logger::info('Mahara [metarefresh]: Executing set [' . $setkey . ']');
$expireAfter = $set->getInteger('expireAfter', NULL);
if ($expireAfter !== NULL) {
......@@ -1606,7 +1606,7 @@ class Metarefresh {
$source['conditionalGET'] = $conditionalGET;
}
SimpleSAML_Logger::debug('cron [metarefresh]: In set [' . $setkey . '] loading source [' . $source['src'] . ']');
SimpleSAML\Logger::debug('cron [metarefresh]: In set [' . $setkey . '] loading source [' . $source['src'] . ']');
$metaloader->loadSource($source);
}
......@@ -1631,7 +1631,7 @@ class Metarefresh {
}
catch (Exception $e) {
SimpleSAML_Logger::info('Mahara [metarefresh]: Error during metadata refresh ' . $e->getMessage());
SimpleSAML\Logger::info('Mahara [metarefresh]: Error during metadata refresh ' . $e->getMessage());
return false;//fetch failed
}
}
......
......@@ -81,7 +81,7 @@ try {
if (!file_exists($path)) {
// file not found
SimpleSAML_Logger::info('Could not find file \''.$path.'\'.');
SimpleSAML\Logger::info('Could not find file \''.$path.'\'.');
throw new SimpleSAML_Error_NotFound('The URL wasn\'t found in the module.');
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment