Change verbosity of TCP read/sent to debug

This commit is contained in:
Deon George 2023-09-06 14:11:18 +12:00
parent ed43aaa878
commit 7b39dafd12
2 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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));
}