]> git.mxchange.org Git - friendica.git/blobdiff - src/Database/DBStructure.php
Logger Levels
[friendica.git] / src / Database / DBStructure.php
index 9abae944ae0e873d8b67a065a95f49fc2f49a07c..9a14114de1f9c935d80d66723accaf713b3b6fb6 100644 (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);
                        }
                }