]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/factories/socket/class_SocketFactory.php
Added line numbers to debug lines as this will become the 'norm'
[hub.git] / application / hub / main / factories / socket / class_SocketFactory.php
index 5ba0c468fd5cb69387853e4864abd8ad210029f6..de4341cda9d597f3dc8805590843ceac39ffa6cd 100644 (file)
@@ -48,7 +48,7 @@ class SocketFactory extends ObjectFactory {
                $registryKey = 'socket_' . $protocolName . '_' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT];
 
                // Debug message
-               self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FACTORY: Trying to find a socket with registryKey=' . $registryKey);
+               self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FACTORY[' . __LINE__ . ']: Trying to find a socket with registryKey=' . $registryKey);
 
                // Is the key there?
                if (Registry::getRegistry()->instanceExists($registryKey)) {
@@ -59,19 +59,19 @@ class SocketFactory extends ObjectFactory {
                        $socketResource = $containerInstance->getSocketResource();
 
                        // Debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FACTORY: Using socket ' . $socketResource . '(' . gettype($socketResource) . ') from registry.');
+                       self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FACTORY[' . __LINE__ . ']: Using socket ' . $socketResource . '(' . gettype($socketResource) . ') from registry.');
                } else {
                        // Construct configuration entry for object factory and get it
                        $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry($protocolName . '_connection_helper_class');
 
                        // Debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FACTORY: Going to use class ' . $className . ' for creating a socket resource ...');
+                       self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FACTORY[' . __LINE__ . ']: Going to use class ' . $className . ' for creating a socket resource ...');
 
                        // And call the static method
                        $socketResource = call_user_func($className . '::createConnectionFromPackageData', $packageData);
 
                        // Debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FACTORY: Created socket ' . $socketResource . '(' . gettype($socketResource) . ') from class ' . $className . '.');
+                       self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FACTORY[' . __LINE__ . ']: Created socket ' . $socketResource . '(' . gettype($socketResource) . ') from class ' . $className . '.');
 
                        // Construct container class, this won't be reached if an exception is thrown
                        $containerInstance = self::CreateObjectByConfiguredName('socket_container_class', array($socketResource, NULL, $packageData));
@@ -80,7 +80,7 @@ class SocketFactory extends ObjectFactory {
                        Registry::getRegistry()->addInstance($registryKey, $containerInstance);
 
                        // Debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FACTORY: Socket is now registered in registry.');
+                       self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-FACTORY[' . __LINE__ . ']: Socket is now registered in registry.');
                }
 
                // Return the resource