replaced deprecated logMessage function
This commit is contained in:
parent
296fb77028
commit
ea223a6d26
@ -144,9 +144,9 @@ class ErrorHandler {
|
||||
$response = FileUtil::loadFile($url);
|
||||
$success = json_decode($response);
|
||||
if ($success) {
|
||||
logMessage('Error-Report successful!');
|
||||
Logger::log('Error-Report successful!');
|
||||
} else {
|
||||
logMessage('Error-Report failed! ' . print_r($response, true));
|
||||
Logger::log('Error-Report failed! ' . print_r($response, true));
|
||||
}
|
||||
}
|
||||
|
||||
@ -399,9 +399,9 @@ class ErrorHandler {
|
||||
$response = FileUtil::loadFile($url);
|
||||
$success = json_decode($response);
|
||||
if ($success) {
|
||||
logMessage('Exception successfully reported!');
|
||||
Logger::log('Exception successfully reported!');
|
||||
} else {
|
||||
logMessage('Exception-Report failed! ' . print_r($response, true));
|
||||
Logger::log('Exception-Report failed! ' . print_r($response, true));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace ManiaControl\Files;
|
||||
|
||||
use ManiaControl\Logger;
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\Utils\Formatter;
|
||||
|
||||
@ -76,16 +77,16 @@ abstract class FileUtil {
|
||||
public static function loadConfig($fileName) {
|
||||
$fileLocation = ManiaControlDir . 'configs' . DIRECTORY_SEPARATOR . $fileName;
|
||||
if (!file_exists($fileLocation)) {
|
||||
logMessage("Config File doesn't exist! ({$fileName})");
|
||||
Logger::log("Config File doesn't exist! ({$fileName})");
|
||||
return null;
|
||||
}
|
||||
if (!is_readable($fileLocation)) {
|
||||
logMessage("Config File isn't readable! Please check the File Permissions. ({$fileName})");
|
||||
Logger::log("Config File isn't readable! Please check the File Permissions. ({$fileName})");
|
||||
return null;
|
||||
}
|
||||
$configXml = @simplexml_load_file($fileLocation);
|
||||
if (!$configXml) {
|
||||
logMessage("Config file isn't maintained properly! ({$fileName})");
|
||||
Logger::log("Config file isn't maintained properly! ({$fileName})");
|
||||
return null;
|
||||
}
|
||||
return $configXml;
|
||||
@ -147,7 +148,7 @@ abstract class FileUtil {
|
||||
}
|
||||
if (!is_writable($fileName)) {
|
||||
$message = "Write-Access missing for File '{$fileName}'!";
|
||||
logMessage($message);
|
||||
Logger::log($message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ class ManiaControl implements CommandListener, TimerListener {
|
||||
if ($stripCodes) {
|
||||
$message = Formatter::stripCodes($message);
|
||||
}
|
||||
logMessage($message);
|
||||
Logger::log($message);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
namespace ManiaControl\Utils;
|
||||
|
||||
use ManiaControl\Logger;
|
||||
|
||||
/**
|
||||
* System Utility Class
|
||||
*
|
||||
@ -76,31 +78,31 @@ class SystemUtil {
|
||||
$phpVersion = phpversion();
|
||||
$message = 'Checking for minimum required PHP-Version ' . MIN_PHP_VERSION . ' ... ';
|
||||
if ($phpVersion < MIN_PHP_VERSION) {
|
||||
logMessage($message . $phpVersion . ' TOO OLD VERSION!');
|
||||
logMessage(' -- Make sure that you install at least PHP ' . MIN_PHP_VERSION . '!');
|
||||
Logger::log($message . $phpVersion . ' TOO OLD VERSION!');
|
||||
Logger::log(' -- Make sure that you install at least PHP ' . MIN_PHP_VERSION . '!');
|
||||
$success = false;
|
||||
} else {
|
||||
logMessage($message . MIN_PHP_VERSION . ' OK!');
|
||||
Logger::log($message . MIN_PHP_VERSION . ' OK!');
|
||||
}
|
||||
|
||||
// Check for MySQLi
|
||||
$message = 'Checking for installed MySQLi ... ';
|
||||
if (!extension_loaded('mysqli')) {
|
||||
logMessage($message . 'NOT FOUND!');
|
||||
logMessage(" -- You don't have MySQLi installed! Check: http://www.php.net/manual/en/mysqli.installation.php");
|
||||
Logger::log($message . 'NOT FOUND!');
|
||||
Logger::log(" -- You don't have MySQLi installed! Check: http://www.php.net/manual/en/mysqli.installation.php");
|
||||
$success = false;
|
||||
} else {
|
||||
logMessage($message . 'FOUND!');
|
||||
Logger::log($message . 'FOUND!');
|
||||
}
|
||||
|
||||
// Check for cURL
|
||||
$message = 'Checking for installed cURL ... ';
|
||||
if (!extension_loaded('curl')) {
|
||||
logMessage($message . 'NOT FOUND!');
|
||||
logMessage(" -- You don't have cURL installed! Check: http://www.php.net/manual/en/curl.installation.php");
|
||||
Logger::log($message . 'NOT FOUND!');
|
||||
Logger::log(" -- You don't have cURL installed! Check: http://www.php.net/manual/en/curl.installation.php");
|
||||
$success = false;
|
||||
} else {
|
||||
logMessage($message . 'FOUND!');
|
||||
Logger::log($message . 'FOUND!');
|
||||
}
|
||||
|
||||
if (!$success) {
|
||||
|
Loading…
Reference in New Issue
Block a user