Create Logger.php

This commit is contained in:
Daniil Gentili 2017-06-08 14:13:28 +02:00 committed by GitHub
parent eebadecaf1
commit d5df933f0d

View File

@ -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)';