X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fconsole%2Fclass_ConsoleTools.php;h=43d2503f62e1e80761fe91b1dad73d6894159c84;hp=960aaa42a926fcd412721eb60d6b32560f5a0046;hb=890190c0eda8bf8baecacb4e842f344f676b4b53;hpb=e7040f10e90178e789f97ef7e195b479250e241a diff --git a/inc/classes/main/console/class_ConsoleTools.php b/inc/classes/main/console/class_ConsoleTools.php index 960aaa42..43d2503f 100644 --- a/inc/classes/main/console/class_ConsoleTools.php +++ b/inc/classes/main/console/class_ConsoleTools.php @@ -161,7 +161,7 @@ class ConsoleTools extends BaseFrameworkSystem { try { // Get a file pointer - $io = FrameworkFileInputPointer::createFrameworkFileInputPointer('/etc/hostname'); + $io = FrameworkFileInputPointer::createFrameworkFileInputPointer($helperInstance->getConfigInstance()->getConfigEntry('hostname_file')); // Read the file $hostname = trim($io->readFromFile()); @@ -181,13 +181,13 @@ class ConsoleTools extends BaseFrameworkSystem { $ip = $helperInstance->resolveIpAddress($_SERVER['COMPUTERNAME']); } else { // Could not find our hostname - $helperInstance->debugOutput(sprintf('[%s:] WARNING: Cannot resolve my own IP address.', + self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:] WARNING: Cannot resolve my own IP address.', $helperInstance->__toString() )); } } catch (FrameworkException $e) { // Output debug message - $helperInstance->debugOutput(sprintf('[%s:] Problem while resolving own IP address: [%s|%s]:%s', + self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:] Problem while resolving own IP address: [%s|%s]:%s', $helperInstance->__toString(), $e->__toString(), $e->getHexCode(), @@ -294,7 +294,7 @@ class ConsoleTools extends BaseFrameworkSystem { // Debug message - /* DEBUG: */ $helperInstance->debugOutput('CONSOLE-TOOLS: Resolved external address: ' . $externalAddress); + /* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONSOLE-TOOLS: Resolved external address: ' . $externalAddress); // Return determined external IP return $externalAddress;