]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/factories/states/peer/class_PeerStateFactory.php
Rewritten remaining (old) debug calls:
[hub.git] / application / hub / main / factories / states / peer / class_PeerStateFactory.php
index 67fb24c3f9f02a1125e928faaee593aff957ac39..6510559c63b14afb6561b0a533674eb061a3bb26 100644 (file)
@@ -81,13 +81,13 @@ class PeerStateFactory extends ObjectFactory {
                        $tableInstance->purgeOldEntriesBySocketResource($socketResource);
                } catch (InvalidSocketException $e) {
                        // Just log all errors
-                       //* NOISY-DEBUG: */ $tableInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Purging of old entries failed. Message from exception: ' . $e->getMessage());
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Purging of old entries failed. Message from exception: ' . $e->getMessage());
                }
 
                // Do we have an entry?
                if ($tableInstance->isSenderNewPeer($packageData)) {
                        // Debug output
-                       //* NOISY-DEBUG: */ $tableInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] errorCode=' . $errorCode);
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] errorCode=' . $errorCode);
 
                        // Register the new peer with its session id
                        $tableInstance->registerPeerByPackageData($packageData, $socketResource);
@@ -102,7 +102,7 @@ class PeerStateFactory extends ObjectFactory {
                        $tableInstance->registerPeerState($stateInstance, $packageData);
                } elseif ($tableInstance->isSamePeerState($helperInstance, $packageData)) {
                        // Debug output
-                       //* NOISY-DEBUG: */ $tableInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state unchanged, re-generating old state ...');
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state unchanged, re-generating old state ...');
 
                        /*
                         * The peer's state has noot changed, still we have to return a
@@ -111,7 +111,7 @@ class PeerStateFactory extends ObjectFactory {
                        $stateInstance = self::createPeerStateInstanceByName($helperInstance->getPrintableState(), $helperInstance);
                } else {
                        // Debug output
-                       //* NOISY-DEBUG: */ $tableInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Updating peer state ...');
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Updating peer state ...');
 
                        /*
                         * It is an already known peer but with a changed state. So first
@@ -124,7 +124,7 @@ class PeerStateFactory extends ObjectFactory {
                }
 
                // Debug message
-               //* NOISY-DEBUG: */ $stateInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state has changed from ' . $helperInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . ' (' . $stateInstance->__toString() . ').');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state has changed from ' . $helperInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . ' (' . $stateInstance->__toString() . ').');
 
                // Set the state in the helper
                $helperInstance->setStateInstance($stateInstance);
@@ -146,7 +146,7 @@ class PeerStateFactory extends ObjectFactory {
                $stateInstance = self::createObjectByConfiguredName('peer_' . $stateName . '_state_class', array($helperInstance));
 
                // Debug message
-               //* NOISY-DEBUG: */ $stateInstance->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state has changed from ' . $helperInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . ' (' . $stateInstance->__toString() . ').');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('PEER-STATE-FACTORY[' . __LINE__ . ':] Peer state has changed from ' . $helperInstance->getPrintableState() . ' to ' . $stateInstance->getStateName() . ' (' . $stateInstance->__toString() . ').');
 
                // Once we have that state, set it in the peer instance
                $helperInstance->setStateInstance($stateInstance);