1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-23 07:51:14 +01:00

Improve logging

This commit is contained in:
Daniil Gentili 2023-07-19 18:14:46 +02:00
parent bde2d0ef58
commit 867a88bcba
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,7 @@
namespace danog\MadelineProto\EventHandler\Filter;
use AssertionError;
use danog\MadelineProto\EventHandler;
use danog\MadelineProto\EventHandler\Filter\Combinator\FiltersAnd;
use danog\MadelineProto\EventHandler\Filter\Combinator\FiltersOr;
@ -90,6 +91,7 @@ abstract class Filter
HasSticker::class => new FilterSticker,
HasVideo::class => new FilterVideo,
HasVoice::class => new FilterVoice,
default => throw new AssertionError("Unknown type ".$type->getName())
}
};
}

View File

@ -38,7 +38,7 @@ abstract class RunnerAbstract
$contents = \file_get_contents(self::SCRIPT_PATH);
$contents = \str_replace('__DIR__', \var_export($path, true), $contents);
$suffix = API::RELEASE;
$suffix = API::RELEASE.'___'.\bin2hex(\random_bytes(10));
self::$pharScriptPath[$alternateTmpDir] = $scriptPath = $alternateTmpDir.'/madeline-ipc-'.$suffix.'.php';
\file_put_contents($scriptPath, $contents, LOCK_EX);
Logger::log("Copied IPC bootstrap file to $scriptPath");