Added dev mode to command line paramters
This commit is contained in:
parent
a32e7df5e0
commit
2ea8e7cf1e
@ -11,7 +11,6 @@
|
|||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
|
|
||||||
// Run configuration
|
// Run configuration
|
||||||
define('DEV_MODE', false); // Development mode to not send error reports etc.
|
|
||||||
define('LOG_NAME_USE_DATE', true); // Use current date as suffix for log file name in logs folder
|
define('LOG_NAME_USE_DATE', true); // Use current date as suffix for log file name in logs folder
|
||||||
define('LOG_NAME_USE_PID', true); // Use current process id as suffix for log file name in logs folder
|
define('LOG_NAME_USE_PID', true); // Use current process id as suffix for log file name in logs folder
|
||||||
|
|
||||||
@ -34,7 +33,21 @@ require_once MANIACONTROL_PATH . 'core' . DIRECTORY_SEPARATOR . 'AutoLoader.php'
|
|||||||
// Setup Logger
|
// Setup Logger
|
||||||
\ManiaControl\Logger::setup();
|
\ManiaControl\Logger::setup();
|
||||||
|
|
||||||
\ManiaControl\Logger::log('Starting ManiaControl...');
|
|
||||||
|
$devMode = \ManiaControl\Utils\CommandLineHelper::getParameter('-dev');
|
||||||
|
|
||||||
|
if($devMode === "true"){
|
||||||
|
define('DEV_MODE', true); // Development mode to not send error reports etc.
|
||||||
|
}else{
|
||||||
|
define('DEV_MODE', false); // Development mode to not send error reports etc.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(DEV_MODE){
|
||||||
|
\ManiaControl\Logger::log('Starting ManiaControl with activated Development Mode...');
|
||||||
|
}else{
|
||||||
|
\ManiaControl\Logger::log('Starting ManiaControl...');
|
||||||
|
}
|
||||||
|
|
||||||
// Check requirements
|
// Check requirements
|
||||||
\ManiaControl\Utils\SystemUtil::checkRequirements();
|
\ManiaControl\Utils\SystemUtil::checkRequirements();
|
||||||
|
Loading…
Reference in New Issue
Block a user