Skip to content

Commit 87d1c0c

Browse files
committed
LoginPacketHandler: make debug message less noisy
1 parent 4cc26be commit 87d1c0c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/network/mcpe/handler/LoginPacketHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
use pocketmine\player\PlayerInfo;
4747
use pocketmine\player\XboxLivePlayerInfo;
4848
use pocketmine\Server;
49+
use pocketmine\utils\Utils;
4950
use Ramsey\Uuid\Uuid;
5051
use Ramsey\Uuid\UuidInterface;
5152
use function chr;
@@ -56,7 +57,6 @@
5657
use function json_decode;
5758
use function md5;
5859
use function ord;
59-
use function var_export;
6060
use const JSON_THROW_ON_ERROR;
6161

6262
/**
@@ -344,7 +344,7 @@ private function defaultJsonMapper(string $logContext) : \JsonMapper{
344344
*/
345345
private function warnUndefinedJsonPropertyHandler(string $context) : \Closure{
346346
return fn(object $object, string $name, mixed $value) => $this->session->getLogger()->warning(
347-
"$context: Unexpected JSON property for " . (new \ReflectionClass($object))->getShortName() . ": " . $name . " = " . var_export($value, return: true)
347+
"$context: Unexpected JSON property for " . (new \ReflectionClass($object))->getShortName() . ": " . Utils::printable(substr($name, 0, 80))
348348
);
349349
}
350350
}

0 commit comments

Comments
 (0)