From: Roland Häder Date: Tue, 7 Aug 2012 16:28:32 +0000 (+0000) Subject: Commented out some 'noisy' debug lines X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ab7c3fd4d897019fae0c0f6a591686db7b6326b2;p=hub.git Commented out some 'noisy' debug lines --- diff --git a/application/hub/main/handler/network/tcp/class_TcpRawDataHandler.php b/application/hub/main/handler/network/tcp/class_TcpRawDataHandler.php index 23bb556dd..61338d029 100644 --- a/application/hub/main/handler/network/tcp/class_TcpRawDataHandler.php +++ b/application/hub/main/handler/network/tcp/class_TcpRawDataHandler.php @@ -66,7 +66,7 @@ class TcpRawDataHandler extends BaseRawDataHandler implements Networkable { $this->setErrorCode(self::SOCKET_ERROR_UNHANDLED); // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TCP-HANDLER: Handling TCP package from resource=' . $socketArray[BasePool::SOCKET_ARRAY_RESOURCE] . ',type=' . $socketArray[BasePool::SOCKET_ARRAY_CONN_TYPE] . ',last error=' . socket_strerror(socket_last_error($socketArray[BasePool::SOCKET_ARRAY_RESOURCE]))); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TCP-HANDLER: Handling TCP package from resource=' . $socketArray[BasePool::SOCKET_ARRAY_RESOURCE] . ',type=' . $socketArray[BasePool::SOCKET_ARRAY_CONN_TYPE] . ',last error=' . socket_strerror(socket_last_error($socketArray[BasePool::SOCKET_ARRAY_RESOURCE]))); /* * Read the raw data from socket. If you change PHP_BINARY_READ to @@ -76,8 +76,8 @@ class TcpRawDataHandler extends BaseRawDataHandler implements Networkable { $rawData = socket_read($socketArray[BasePool::SOCKET_ARRAY_RESOURCE], $this->getConfigInstance()->getConfigEntry('tcp_buffer_length'), PHP_BINARY_READ); // Debug output of read data length - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TCP-HANDLER: rawData[' . gettype($rawData) . ']=' . strlen($rawData) . ',MD5=' . md5($rawData) . ',resource=' . $socketArray[BasePool::SOCKET_ARRAY_RESOURCE] . ',error=' . socket_strerror(socket_last_error($socketArray[BasePool::SOCKET_ARRAY_RESOURCE]))); - /* NOISY-DEBUG: */ if ($rawData !== false) self::createDebugInstance(__CLASS__)->debugOutput('TCP-HANDLER: rawData=' . $rawData); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TCP-HANDLER: rawData[' . gettype($rawData) . ']=' . strlen($rawData) . ',MD5=' . md5($rawData) . ',resource=' . $socketArray[BasePool::SOCKET_ARRAY_RESOURCE] . ',error=' . socket_strerror(socket_last_error($socketArray[BasePool::SOCKET_ARRAY_RESOURCE]))); + //* NOISY-DEBUG: */ if ($rawData !== false) self::createDebugInstance(__CLASS__)->debugOutput('TCP-HANDLER: rawData=' . $rawData); // Is it valid? if (socket_last_error($socketArray[BasePool::SOCKET_ARRAY_RESOURCE]) == 11) { diff --git a/application/hub/main/package/assembler/class_PackageAssembler.php b/application/hub/main/package/assembler/class_PackageAssembler.php index 36e36dc92..abf8cccb5 100644 --- a/application/hub/main/package/assembler/class_PackageAssembler.php +++ b/application/hub/main/package/assembler/class_PackageAssembler.php @@ -140,7 +140,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable */ private function handlePackageByUnhandledPackage (array $packageContent) { // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER: packageData[' . BaseRawDataHandler::PACKAGE_RAW_DATA . ']=' . $packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER: packageData[' . BaseRawDataHandler::PACKAGE_RAW_DATA . ']=' . $packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]); // Check for some conditions if ((!$this->ifInputBufferIsEmpty()) || (!$this->isPackageContentCompleted($packageContent))) { @@ -148,10 +148,10 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable $this->pendingData .= $packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]; // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER: Partial data received. Waiting for more ... ( ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes)'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER: Partial data received. Waiting for more ... ( ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes)'); } else { // Debug message - /* NOISY-DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('packageContent=' . print_r($packageContent,true) . ',chunks='.print_r($chunks,true)); + /* DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER: packageContent=' . print_r($packageContent,true) . ',chunks='.print_r($chunks,true)); } } @@ -176,7 +176,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable */ public function handlePendingData () { // Debug output - /* NOISY-DEBUG: */ $this->debugOutput('PACKAGE-ASSEMBLER: Going to decode ' . strlen($this->pendingData) . ' Bytes of pending data. pendingData=' . $this->pendingData); + //* NOISY-DEBUG: */ $this->debugOutput('PACKAGE-ASSEMBLER: Going to decode ' . strlen($this->pendingData) . ' Bytes of pending data. pendingData=' . $this->pendingData); // Assert on condition assert(!$this->isPendingDataEmpty()); @@ -191,7 +191,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable $this->pendingData = ''; // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER: Last block of partial data received. A total of ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes has been received.'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-ASSEMBLER: Last block of partial data received. A total of ' . strlen($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA]) . ' bytes has been received.'); // Make sure last CHUNK_SEPARATOR is not there if (substr($packageContent[BaseRawDataHandler::PACKAGE_RAW_DATA], -1, 1) == PackageFragmenter::CHUNK_SEPARATOR) {