From 7b39dafd129c1ecc5db53c664bb1fa15f288963b Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 6 Sep 2023 14:11:18 +1200 Subject: [PATCH] Change verbosity of TCP read/sent to debug --- app/Classes/Protocol/Binkp.php | 8 ++++---- app/Classes/Sock/SocketClient.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Classes/Protocol/Binkp.php b/app/Classes/Protocol/Binkp.php index bca78fa..043d579 100644 --- a/app/Classes/Protocol/Binkp.php +++ b/app/Classes/Protocol/Binkp.php @@ -606,7 +606,7 @@ final class Binkp extends BaseProtocol try { Log::debug(sprintf('%s:- Sending [%d] chars to remote: tx_buf [%d], tx_ptr [%d]',self::LOGKEY,$this->tx_left,strlen($this->tx_buf),$this->tx_ptr)); $rc = $this->client->send(substr($this->tx_buf,$this->tx_ptr,$this->tx_left),self::TIMEOUT_TIME); - Log::info(sprintf('%s:- Sent [%d] chars to remote',self::LOGKEY,$rc)); + Log::debug(sprintf('%s:- Sent [%d] chars to remote',self::LOGKEY,$rc)); } catch (\Exception $e) { if ($e->getCode() === 11) { @@ -1452,9 +1452,9 @@ final class Binkp extends BaseProtocol while (! $this->error) { try { - Log::info(sprintf('%s:- BINKP reading [%d]',self::LOGKEY,self::MAX_BLKSIZE)); + Log::debug(sprintf('%s:- BINKP reading [%d]',self::LOGKEY,self::MAX_BLKSIZE)); $buf = $this->client->read(0,self::MAX_BLKSIZE); - Log::info(sprintf('%s:- BINKP got [%d] chars',self::LOGKEY,strlen($buf))); + Log::debug(sprintf('%s:- BINKP got [%d] chars',self::LOGKEY,strlen($buf))); } catch (\Exception $e) { if ($e->getCode() !== 11) { @@ -1472,7 +1472,7 @@ final class Binkp extends BaseProtocol Log::warning(sprintf('%s:- Purged [%d] bytes from input stream (%s) ',self::LOGKEY,strlen($buf),hex_dump($buf))); } - Log::info(sprintf('%s:- We have [%d] messages and [%d] data left to send',self::LOGKEY,$this->mqueue->count(),strlen($this->tx_left))); + Log::debug(sprintf('%s:- We have [%d] messages and [%d] data left to send',self::LOGKEY,$this->mqueue->count(),strlen($this->tx_left))); while (! $this->error && ($this->mqueue->count() || $this->tx_left) && $this->binkp_send()) {} return $this->rc; diff --git a/app/Classes/Sock/SocketClient.php b/app/Classes/Sock/SocketClient.php index 3c93bd9..11996f0 100644 --- a/app/Classes/Sock/SocketClient.php +++ b/app/Classes/Sock/SocketClient.php @@ -338,7 +338,7 @@ final class SocketClient { return $result; } - Log::error(sprintf('%s:! Request to read [%d] chars resulted in no data',self::LOGKEY,$len)); + Log::debug(sprintf('%s:! Request to read [%d] chars resulted in no data',self::LOGKEY,$len)); throw new SocketException($x=socket_last_error($this->connection),socket_strerror($x)); }