. */ /** * GNU social's logger wrapper around Symfony's, * keeping our old static interface, which is more convenient and just as powerful * * @package GNUsocial * @category Log * * @author Hugo Sales * @copyright 2020 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ namespace App\Util; use Psr\Log\LoggerInterface; class Log { private static ?LoggerInterface $logger; public static function setLogger($l): void { self::$logger = $l; } /** * Simple static wrappers around Monolog's functions */ public static function emergency(string $msg): void { self::$logger->emergency($msg); } public static function alert(string $msg): void { self::$logger->alert($msg); } public static function critical(string $msg): void { self::$logger->critical($msg); } public static function error(string $msg): void { self::$logger->error($msg); } public static function warning(string $msg): void { self::$logger->warning($msg); } public static function notice(string $msg): void { self::$logger->notice($msg); } public static function info(string $msg): void { self::$logger->info($msg); } public static function debug(string $msg): void { $logger->debug($msg); } }