[LOG] Only try to log if setup, so logs can be disabled, in tests, for instance

This commit is contained in:
Hugo Sales 2021-04-05 13:43:32 +00:00
parent d082f4249c
commit b855dd00ac
1 changed files with 3 additions and 1 deletions

View File

@ -47,6 +47,8 @@ abstract class Log
*/
public static function __callStatic(string $name, array $args)
{
return self::$logger->{$name}(...$args);
if (isset(self::$logger)) {
return self::$logger->{$name}(...$args);
}
}
}