1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 06:59:01 +01:00

Improve logging

This commit is contained in:
Daniil Gentili 2018-03-27 19:31:19 +00:00
parent ed68a88598
commit 3d4813eb02

View File

@ -123,12 +123,12 @@ class Logger
public static function log($param, $level = self::NOTICE)
{
if ($level > self::$level || self::$mode === 0) {
return false;
}
if (self::$mode === 4) {
return call_user_func_array(self::$optional, [$param, $level]);
}
if ($level > self::$level) {
return false;
}
$prefix = self::$prefix;
if (\danog\MadelineProto\Logger::$has_thread && is_object(\Thread::getCurrentThread())) {
$prefix .= ' (t)';