]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/tools/class_HubTools.php
Added line numbers to debug lines as this will become the 'norm'
[hub.git] / application / hub / main / tools / class_HubTools.php
index 8c7c85d5def59c7fcaec452cbda9dc125d695d84..17ad9dec3a5bf516b32ba5a84607093edd3e3566 100644 (file)
@@ -155,19 +155,19 @@ class HubTools extends BaseHubSystem {
                // Does it match a direct ip:port? (hint: see www.regexlib.com for the regular expression)
                if (preg_match('/((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])):([0-9]{3,5})/', $sessionId)) {
                        // Direct ip:port found
-                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS: Direct ip:port ' . $sessionId . ' detected.');
+                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __LINE__ . ']: Direct ip:port ' . $sessionId . ' detected.');
                } elseif (isset($selfInstance->sessionIdCache[$sessionId])) {
                        // Debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS: Using entry from sessionIdCache[] array.');
+                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __LINE__ . ']: Using entry from sessionIdCache[] array.');
 
                        // Found in cache!
                        $recipient = $selfInstance->sessionIdCache[$sessionId];
 
                        // Debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS: sessionIdCache[' . $sessionId . ']=' . $recipient);
+                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __LINE__ . ']: sessionIdCache[' . $sessionId . ']=' . $recipient);
                } elseif (preg_match('/([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}:([0-9]{3,5})/', $sessionId)) {
                        // Hostname:port found
-                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS: hostname:port ' . $sessionId . ' detected.');
+                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __LINE__ . ']: hostname:port ' . $sessionId . ' detected.');
 
                        // Hostname:port found
                        $hostnameArray = explode(':', $sessionId);
@@ -185,16 +185,16 @@ class HubTools extends BaseHubSystem {
                        } // END - if
 
                        // Debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS: hostname:port ' . $sessionId . ' resolved to ' . $recipient);
+                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __LINE__ . ']: hostname:port ' . $sessionId . ' resolved to ' . $recipient);
                } elseif (preg_match('/([a-f0-9]{' . $selfInstance->getSessionIdLength() . '})/', $sessionId)) {
                        // Debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS: Using internal session id resolver.');
+                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __LINE__ . ']: Using internal session id resolver.');
 
                        // Resolve session id into a ip:port combination
                        $recipient = $selfInstance->resolveIpPortBySessionId($sessionId);
 
                        // Debug message
-                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS: Session id ' . $sessionId . ' resolved to ' . $recipient);
+                       self::createDebugInstance(__CLASS__)->debugOutput('HUB-TOOLS[' . __LINE__ . ']: Session id ' . $sessionId . ' resolved to ' . $recipient);
                } else {
                        // Invalid session id
                        throw new InvalidSessionIdException($sessionId, self::EXCEPTION_SESSION_ID_IS_INVALID);