From e75d7c5517a67d4dbb34e5ec20018e5f475ba29c Mon Sep 17 00:00:00 2001 From: Nadyita Date: Thu, 22 Feb 2024 14:41:29 +0100 Subject: [PATCH] Log sending packages --- src/BasicClient.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/BasicClient.php b/src/BasicClient.php index 0f20367..0336b00 100644 --- a/src/BasicClient.php +++ b/src/BasicClient.php @@ -164,10 +164,15 @@ public function read(): ?Package\In { } public function write(Package\Out $package): void { + $this->logger?->debug("Sending package {package}", [ + "package" => $package, + ]); $binPackage = $package->toBinaryPackage(); if ($package instanceof Package\Out\RateLimited) { + $this->logger?->debug("Sending rate-limited package via bucket-queue"); $this->bucket->take(callback: fn () => $this->connection->write($binPackage->toBinary())); } else { + $this->logger?->debug("Sending non-rate-limited package instantly"); $this->connection->write($binPackage->toBinary()); } }