diff --git a/src/danog/MadelineProto/Logger.php b/src/danog/MadelineProto/Logger.php index 40624124..d05477bc 100644 --- a/src/danog/MadelineProto/Logger.php +++ b/src/danog/MadelineProto/Logger.php @@ -64,12 +64,12 @@ class Logger public static function log($params, $level = self::NOTICE) { - if (!self::$constructed) { - throw new Exception("The constructor function wasn't called! Please call the constructor function before using this method."); - } if ($level > self::$level) { return false; } + if (!self::$constructed) { + throw new Exception("The constructor function wasn't called! Please call the constructor function before using this method."); + } $prefix = self::$prefix; if (\danog\MadelineProto\Logger::$has_thread && is_object(\Thread::getCurrentThread())) { $prefix .= ' (t)';