mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-23 07:51:14 +01:00
Improve logging
This commit is contained in:
parent
bde2d0ef58
commit
867a88bcba
@ -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())
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user