From d5df933f0d189e95d4a8d558c1f3e1c92f1360d8 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 8 Jun 2017 14:13:28 +0200 Subject: [PATCH] Create Logger.php --- src/danog/MadelineProto/Logger.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)';