Create Logger.php
This commit is contained in:
parent
eebadecaf1
commit
d5df933f0d
@ -64,12 +64,12 @@ class Logger
|
|||||||
|
|
||||||
public static function log($params, $level = self::NOTICE)
|
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) {
|
if ($level > self::$level) {
|
||||||
return false;
|
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;
|
$prefix = self::$prefix;
|
||||||
if (\danog\MadelineProto\Logger::$has_thread && is_object(\Thread::getCurrentThread())) {
|
if (\danog\MadelineProto\Logger::$has_thread && is_object(\Thread::getCurrentThread())) {
|
||||||
$prefix .= ' (t)';
|
$prefix .= ' (t)';
|
||||||
|
Loading…
Reference in New Issue
Block a user