Log function

implement log() function.
This commit is contained in:
Adam Magness 2018-10-29 17:20:46 -04:00
parent d6d593d724
commit 14fde5dc9b
122 changed files with 1280 additions and 1161 deletions

View file

@ -8,6 +8,7 @@ use Exception;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Util\DateTimeFormat;
require_once 'boot.php';
@ -69,7 +70,7 @@ class DBStructure
// No valid result?
if (!DBA::isResult($adminlist)) {
logger(sprintf('Cannot notify administrators about update_id=%d, error_message=%s', $update_id, $error_message), LOGGER_INFO);
Logger::log(sprintf('Cannot notify administrators about update_id=%d, error_message=%s', $update_id, $error_message), LOGGER_INFO);
// Don't continue
return;
@ -100,7 +101,7 @@ class DBStructure
}
//try the logger
logger("CRITICAL: Database structure update failed: ".$error_message);
Logger::log("CRITICAL: Database structure update failed: ".$error_message);
}
@ -221,7 +222,7 @@ class DBStructure
$errors = '';
logger('updating structure', LOGGER_DEBUG);
Logger::log('updating structure', LOGGER_DEBUG);
// Get the current structure
$database = [];
@ -234,7 +235,7 @@ class DBStructure
foreach ($tables AS $table) {
$table = current($table);
logger(sprintf('updating structure for table %s ...', $table), LOGGER_DEBUG);
Logger::log(sprintf('updating structure for table %s ...', $table), LOGGER_DEBUG);
$database[$table] = self::tableStructure($table);
}
}