logging methods

This commit is contained in:
Steffen Schröder
2014-06-17 22:37:34 +02:00
parent 1e641f69c6
commit 296fb77028
2 changed files with 43 additions and 10 deletions

View File

@ -34,20 +34,14 @@ require_once ManiaControlDir . 'core' . DIRECTORY_SEPARATOR . 'AutoLoader.php';
\ManiaControl\Logger::setup();
/**
* Log and echo the given text
*
* @param string $message
* @param bool $eol
* @deprecated
* @see \ManiaControl\Logger::log()
*/
function logMessage($message, $eol = true) {
error_log($message);
if ($eol) {
$message = '[' . date('d-M-Y H:i:s e') . '] ' . $message . PHP_EOL;
}
echo $message;
\ManiaControl\Logger::log($message, $eol);
}
logMessage('Starting ManiaControl...');
\ManiaControl\Logger::log('Starting ManiaControl...');
// Check requirements
\ManiaControl\Utils\SystemUtil::checkRequirements();