From: Roland Haeder Date: Fri, 21 Feb 2014 20:44:39 +0000 (+0100) Subject: Improved a lot logger. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=29baa7f3dde0f8df140175474aff39afce986bb2;p=hub.git Improved a lot logger. Signed-off-by: Roland Haeder --- diff --git a/application/hub/main/class_BaseHubSystem.php b/application/hub/main/class_BaseHubSystem.php index 4af449242..78e3d55c8 100644 --- a/application/hub/main/class_BaseHubSystem.php +++ b/application/hub/main/class_BaseHubSystem.php @@ -522,7 +522,7 @@ class BaseHubSystem extends BaseFrameworkSystem { default: // Everything else <> 0 // Unhandled error code detected, so first debug it because we may want to handle it like the others - self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] UNKNOWN ERROR CODE = ' . $errorCode . ', MESSAGE = ' . socket_strerror($errorCode)); + self::createDebugInstance(__CLASS__)->debugOutput('BASE-HUB[' . __METHOD__ . ':' . __LINE__ . '] UNKNOWN ERROR CODE = ' . $errorCode . ', MESSAGE = ' . socket_strerror($errorCode)); // Change it only in this class $errorName = BaseRawDataHandler::SOCKET_ERROR_UNKNOWN; diff --git a/application/hub/main/dht/class_BaseDht.php b/application/hub/main/dht/class_BaseDht.php index a1de47c6c..6ad3beda3 100644 --- a/application/hub/main/dht/class_BaseDht.php +++ b/application/hub/main/dht/class_BaseDht.php @@ -163,7 +163,7 @@ abstract class BaseDht extends BaseHubSystem { assert(is_array($current)); // ... and push it to the next stack - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] Pushing entry with ' . count($current) . ' elements to stack ' . self::STACKER_NAME_PENDING_PUBLISHING . ' ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-DHT[' . __METHOD__ . ':' . __LINE__ . '] Pushing entry with ' . count($current) . ' elements to stack ' . self::STACKER_NAME_PENDING_PUBLISHING . ' ...'); $this->getStackerInstance()->pushNamed(self::STACKER_NAME_PENDING_PUBLISHING, $current); } // END - while } @@ -178,7 +178,7 @@ abstract class BaseDht extends BaseHubSystem { $isPending = ($this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_PENDING_PUBLISHING) === FALSE); // Return status - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] isPending=' . intval($isPending)); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-DHT[' . __METHOD__ . ':' . __LINE__ . '] isPending=' . intval($isPending)); return $isPending; } diff --git a/application/hub/main/filter/node/class_NodeInitializationFilter.php b/application/hub/main/filter/node/class_NodeInitializationFilter.php index f302ebcfc..3d9f694a8 100644 --- a/application/hub/main/filter/node/class_NodeInitializationFilter.php +++ b/application/hub/main/filter/node/class_NodeInitializationFilter.php @@ -55,7 +55,7 @@ class NodeInitializationFilter extends BaseNodeFilter implements Filterable { public function execute (Requestable $requestInstance, Responseable $responseInstance) { // The default node-mode is from our configuration $nodeMode = $this->getConfigInstance()->getConfigEntry('node_default_mode'); - //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[INIT:] Got default node mode ' . $nodeMode . ' from configuration.'); + //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE-INIT-FILTER[' . __METHOD__ . ':' . __LINE__ . ']: Got default node mode ' . $nodeMode . ' from configuration.'); // Is the node 'mode' parameter set? if ($requestInstance->isRequestElementSet('mode')) { @@ -90,7 +90,7 @@ class NodeInitializationFilter extends BaseNodeFilter implements Filterable { // Set the node instance in registry Registry::getRegistry()->addInstance('node', $nodeInstance); - //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[INIT:] Node ' . $nodeMode . ' has been added to registry.'); + //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE-INIT-FILTER[' . __METHOD__ . ':' . __LINE__ . ']: Node ' . $nodeMode . ' has been added to registry.'); } } diff --git a/application/hub/main/listener/class_BaseListenerDecorator.php b/application/hub/main/listener/class_BaseListenerDecorator.php index e1e1bd54b..758ae306d 100644 --- a/application/hub/main/listener/class_BaseListenerDecorator.php +++ b/application/hub/main/listener/class_BaseListenerDecorator.php @@ -151,7 +151,7 @@ class BaseListenerDecorator extends BaseDecorator implements Visitable { * if the decoded data origins from a TCP or UDP connection so we can * just pass it over to the network package receiver */ - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] Going to handle over some raw data to receiver instance (' . $receiverInstance->__toString() . ') ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-LISTENER-DECORATOR[' . __METHOD__ . ':' . __LINE__ . '] Going to handle over some raw data to receiver instance (' . $receiverInstance->__toString() . ') ...'); $receiverInstance->addRawDataToIncomingStack($handlerInstance); } } diff --git a/application/hub/main/listener/tcp/class_TcpListener.php b/application/hub/main/listener/tcp/class_TcpListener.php index da332df8f..473db762f 100644 --- a/application/hub/main/listener/tcp/class_TcpListener.php +++ b/application/hub/main/listener/tcp/class_TcpListener.php @@ -238,7 +238,7 @@ class TcpListener extends BaseListener implements Listenable { $newSocket = socket_accept($this->getSocketResource()); // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: newSocket=' . $newSocket . ',serverSocket=' .$this->getSocketResource()); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('TCP-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: newSocket=' . $newSocket . ',serverSocket=' .$this->getSocketResource()); // Array for timeout settings $options = array( diff --git a/application/hub/main/lists/class_BaseList.php b/application/hub/main/lists/class_BaseList.php index da74cbc66..a2f095010 100644 --- a/application/hub/main/lists/class_BaseList.php +++ b/application/hub/main/lists/class_BaseList.php @@ -199,7 +199,7 @@ class BaseList extends BaseHubSystem implements IteratorAggregate, Countable { // Generate hash $hash = $this->generateHash($groupName, $groupName, $entry); - //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: groupName=' . $groupName . ', entry=' . $entry . ', hash=' . $hash); + //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-LIST[' . __METHOD__ . ':' . __LINE__ . ']: groupName=' . $groupName . ', entry=' . $entry . ', hash=' . $hash); // Add the hash to the index array_push($this->listIndex, $hash); @@ -229,7 +229,7 @@ class BaseList extends BaseHubSystem implements IteratorAggregate, Countable { // Generate hash $hash = $this->generateHash($groupName, $groupName, $entry); - //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: groupName=' . $groupName . ', entry=' . $entry . ', hash=' . $hash); + //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-LIST[' . __METHOD__ . ':' . __LINE__ . ']: groupName=' . $groupName . ', entry=' . $entry . ', hash=' . $hash); // Remove it from the list ... unset($this->listEntries[$hash]); @@ -271,7 +271,7 @@ class BaseList extends BaseHubSystem implements IteratorAggregate, Countable { $entry2 = crc32($entry[BasePool::SOCKET_ARRAY_RESOURCE] . ':' . $entry[BasePool::SOCKET_ARRAY_CONN_TYPE]); } else { // Unsupported type detected - self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: Entry type ' . gettype($entry) . ' is unsupported.'); + self::createDebugInstance(__CLASS__)->debugOutput('BASE-LIST[' . __METHOD__ . ':' . __LINE__ . ']: Entry type ' . gettype($entry) . ' is unsupported.'); // @TODO Extend this somehow? $entry2 = gettype($entry); diff --git a/application/hub/main/package/fragmenter/class_PackageFragmenter.php b/application/hub/main/package/fragmenter/class_PackageFragmenter.php index 87641ac93..ca5fb4a94 100644 --- a/application/hub/main/package/fragmenter/class_PackageFragmenter.php +++ b/application/hub/main/package/fragmenter/class_PackageFragmenter.php @@ -220,7 +220,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera assert(strlen($finalHash) > 0); // Is the pointer already initialized? - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ': finalHash[' . gettype($finalHash) . ']=' . $finalHash); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-FRAGMENTER[' . __METHOD__ . ':' . __LINE__ . ']: finalHash[' . gettype($finalHash) . ']=' . $finalHash); assert(isset($this->chunkPointers[$finalHash])); // Return it @@ -237,7 +237,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera assert(isset($this->chunkPointers[$finalHash])); // Count one up - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ': finalHash[' . gettype($finalHash) . ']=' . $finalHash); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-FRAGMENTER[' . __METHOD__ . ':' . __LINE__ . ']: finalHash[' . gettype($finalHash) . ']=' . $finalHash); $this->chunkPointers[$finalHash]++; } @@ -302,7 +302,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera $this->generateHashFromRawData($lastChunk); // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ': Adding EOP chunk with size of ' . strlen($chunkData) . ',finalHash=' . $finalHash . ' ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-FRAGMENTER[' . __METHOD__ . ':' . __LINE__ . ']: Adding EOP chunk with size of ' . strlen($chunkData) . ',finalHash=' . $finalHash . ' ...'); // Add it as regular chunk $this->addChunkData($finalHash, $chunkData); @@ -323,7 +323,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera // Calculate real (data) chunk size $dataChunkSize = $this->getDataChunkSizeFromHash($finalHash); - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ': dataChunkSize=' . $dataChunkSize); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-FRAGMENTER[' . __METHOD__ . ':' . __LINE__ . ']: dataChunkSize=' . $dataChunkSize); // Init variables $chunkHash = ''; @@ -339,7 +339,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera } // END - for // Debug output - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ': Raw data of ' . strlen($rawData) . ' bytes has been fragmented into ' . count($this->chunks[$finalHash]) . ' chunk(s).'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-FRAGMENTER[' . __METHOD__ . ':' . __LINE__ . ']: Raw data of ' . strlen($rawData) . ' bytes has been fragmented into ' . count($this->chunks[$finalHash]) . ' chunk(s).'); // Add end-of-package chunk $this->appendEndOfPackageChunk($chunkData, $finalHash); @@ -366,18 +366,18 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera ); // Make sure the chunk is not larger than a TCP package can hold - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ': assert: ' . strlen($rawData) . '/' . NetworkPackage::TCP_PACKAGE_SIZE . ' ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-FRAGMENTER[' . __METHOD__ . ':' . __LINE__ . ']: assert: ' . strlen($rawData) . '/' . NetworkPackage::TCP_PACKAGE_SIZE . ' ...'); // @TODO This assert broke packages where the hash chunk was very large: assert(strlen($rawData) <= NetworkPackage::TCP_PACKAGE_SIZE); // Add it to the array if ($prepend === TRUE) { // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ': Prepending ' . strlen($rawData) . ' bytes of a chunk, finalHash=' . $finalHash . ' ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-FRAGMENTER[' . __METHOD__ . ':' . __LINE__ . ']: Prepending ' . strlen($rawData) . ' bytes of a chunk, finalHash=' . $finalHash . ' ...'); array_unshift($this->chunkHashes[$finalHash], $rawDataHash); array_unshift($this->chunks[$finalHash] , $rawData); } else { // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ': Appending ' . strlen($rawData) . ' bytes of a chunk, finalHash=' . $finalHash . ' ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-FRAGMENTER[' . __METHOD__ . ':' . __LINE__ . ']: Appending ' . strlen($rawData) . ' bytes of a chunk, finalHash=' . $finalHash . ' ...'); // Is the array there? if (!isset($this->chunks[$finalHash])) { @@ -417,14 +417,14 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera assert($this->serialNumber[$finalHash] <= $this->maxSerialNumber); // Encode the current serial number - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ': serialNumber[' . $finalHash . ']=' . $this->serialNumber[$finalHash]); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-FRAGMENTER[' . __METHOD__ . ':' . __LINE__ . ']: serialNumber[' . $finalHash . ']=' . $this->serialNumber[$finalHash]); $encodedSerialNumber = $this->dec2Hex($this->serialNumber[$finalHash], self::MAX_SERIAL_LENGTH); // Count one up $this->serialNumber[$finalHash]++; // Return the encoded serial number - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ': encodedSerialNumber=' . $encodedSerialNumber); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-FRAGMENTER[' . __METHOD__ . ':' . __LINE__ . ']: encodedSerialNumber=' . $encodedSerialNumber); return $encodedSerialNumber; } @@ -473,7 +473,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera } // Return final hash - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ': finalHash[' . gettype($finalHash) . ']=' . $finalHash); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-FRAGMENTER[' . __METHOD__ . ':' . __LINE__ . ']: finalHash[' . gettype($finalHash) . ']=' . $finalHash); return $finalHash; } @@ -488,7 +488,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera */ public function getNextRawDataChunk ($finalHash) { // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ': finalHash[' . gettype($finalHash) . ']=' . $finalHash); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PACKAGE-FRAGMENTER[' . __METHOD__ . ':' . __LINE__ . ']: finalHash[' . gettype($finalHash) . ']=' . $finalHash); try { // Get current chunk index diff --git a/application/hub/main/pools/peer/class_DefaultPeerPool.php b/application/hub/main/pools/peer/class_DefaultPeerPool.php index 9debc2842..de65ec4b2 100644 --- a/application/hub/main/pools/peer/class_DefaultPeerPool.php +++ b/application/hub/main/pools/peer/class_DefaultPeerPool.php @@ -94,7 +94,7 @@ class DefaultPeerPool extends BasePool implements PoolablePeer { */ public function addPeer ($socketResource, $connectionType) { // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ': socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',connectionType=' . $connectionType . ' - ENTERED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DEFAULT-PEER-POOL[' . __METHOD__ . ':' . __LINE__ . ']: socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',connectionType=' . $connectionType . ' - ENTERED!'); // Validate the socket $this->validateSocket($socketResource); diff --git a/application/hub/main/registry/socket/class_SocketRegistry.php b/application/hub/main/registry/socket/class_SocketRegistry.php index aa89bfd77..96ea11e9d 100644 --- a/application/hub/main/registry/socket/class_SocketRegistry.php +++ b/application/hub/main/registry/socket/class_SocketRegistry.php @@ -114,7 +114,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke */ private function isProtocolRegistered (ProtocolHandler $protocolInstance) { // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ':protocol=' . $protocolInstance->getProtocol() . ' - ENTERED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocol() . ' - ENTERED!'); // Get the key $key = $this->getRegistryKeyFromProtocol($protocolInstance); @@ -123,7 +123,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke $isRegistered = $this->instanceExists($key); // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ':protocol=' . $protocolInstance->getProtocol() . ',isRegistered=' . intval($isRegistered) . ' - EXIT!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocol() . ',isRegistered=' . intval($isRegistered) . ' - EXIT!'); // Return result return $isRegistered; @@ -139,7 +139,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke */ public function isSocketRegistered (ProtocolHandler $protocolInstance, $socketResource) { // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ':protocol=' . $protocolInstance->getProtocol() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - ENTERED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocol() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - ENTERED!'); // Default is not registered $isRegistered = FALSE; @@ -178,7 +178,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke } // END - if // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ':protocol=' . $protocolInstance->getProtocol() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',isRegistered=' . intval($isRegistered) . ' - EXIT!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocol() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',isRegistered=' . intval($isRegistered) . ' - EXIT!'); // Return the result return $isRegistered; @@ -195,7 +195,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke */ public function registerSocket (ProtocolHandler $protocolInstance, $socketResource, array $packageData = array()) { // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ':protocol=' . $protocolInstance->getProtocol() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - ENTERED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocol() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - ENTERED!'); // Is the socket already registered? if ($this->isSocketRegistered($protocolInstance, $socketResource)) { @@ -235,7 +235,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke */ public function getRegisteredSocketResource (ProtocolHandler $protocolInstance) { // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ':protocol=' . $protocolInstance->getProtocol() . ' - ENTERED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocol() . ' - ENTERED!'); // The socket must be registered before we can return it if (!$this->isProtocolRegistered($protocolInstance)) { @@ -256,7 +256,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke $socketResource = $registryInstance->getInstance($socketKey)->getSocketResource(); // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(__METHOD__ . ':protocol=' . $protocolInstance->getProtocol() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - EXIT!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:protocol=' . $protocolInstance->getProtocol() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - EXIT!'); // Return the resource return $socketResource; diff --git a/application/hub/main/statistics/connection/class_ConnectionStatisticsHelper.php b/application/hub/main/statistics/connection/class_ConnectionStatisticsHelper.php index dfef3221b..29e5df2d1 100644 --- a/application/hub/main/statistics/connection/class_ConnectionStatisticsHelper.php +++ b/application/hub/main/statistics/connection/class_ConnectionStatisticsHelper.php @@ -57,7 +57,7 @@ class ConnectionStatisticsHelper extends BaseHubSystem { * @return $isExhausted Whether the retry count has been reached */ public static function isConnectRetryExhausted (ConnectionHelper $helperInstance) { - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ' - ENTERED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-STATISTICS[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ' - ENTERED!'); // Construct config entry $configEntry = $helperInstance->getProtocol() . '_connect_retry_max'; @@ -71,7 +71,7 @@ class ConnectionStatisticsHelper extends BaseHubSystem { ); // Return it - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ',isExhausted=' . intval($isExhausted) . ' - EXIT!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-STATISTICS[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ',isExhausted=' . intval($isExhausted) . ' - EXIT!'); return $isExhausted; } @@ -82,15 +82,15 @@ class ConnectionStatisticsHelper extends BaseHubSystem { * @return void */ public static function increaseConnectRetry (ConnectionHelper $helperInstance) { - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ' - ENTERED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-STATISTICS[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ' - ENTERED!'); // Is the counter there if (!isset(self::$connectionStatistics[$helperInstance->getProtocol()][$helperInstance->__toString()]['retry_count'])) { // First attempt - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ' - FIRST!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-STATISTICS[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ' - FIRST!'); self::$connectionStatistics[$helperInstance->getProtocol()][$helperInstance->__toString()]['retry_count'] = 1; } else { // Next attempt - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ' - INCREMENT!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-STATISTICS[' . __METHOD__ . ':' . __LINE__ . ']: helperInstance=' . $helperInstance->__toString() . ' - INCREMENT!'); self::$connectionStatistics[$helperInstance->getProtocol()][$helperInstance->__toString()]['retry_count']++; } diff --git a/application/hub/main/streams/raw_data/output/class_RawDataOutputStream.php b/application/hub/main/streams/raw_data/output/class_RawDataOutputStream.php index dd4a9e217..caf5cae27 100644 --- a/application/hub/main/streams/raw_data/output/class_RawDataOutputStream.php +++ b/application/hub/main/streams/raw_data/output/class_RawDataOutputStream.php @@ -58,9 +58,9 @@ class RawDataOutputStream extends BaseStream implements OutputStreamable { * [[S]] - Start marker * [[E]] - End marker */ - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: data()=' . strlen($data) . ' - BEFORE!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RAW-OUTPUT-STREAM[' . __METHOD__ . ':' . __LINE__ . ']: data()=' . strlen($data) . ' - BEFORE!'); $data = BaseRawDataHandler::STREAM_START_MARKER . base64_encode($data) . BaseRawDataHandler::STREAM_END_MARKER; - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: data(' . strlen($data) . ')=' . $data); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RAW-OUTPUT-STREAM[' . __METHOD__ . ':' . __LINE__ . ']: data(' . strlen($data) . ')=' . $data); // Return it return $data; diff --git a/core b/core index 6807d3268..882c6e83b 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 6807d3268e4f233bf224155956ef6858925b58b0 +Subproject commit 882c6e83b89e5c168812498025b9c48857edb952