mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
Enable console debug depending on environment
This commit is contained in:
@@ -73,9 +73,17 @@ class CLI extends Application
|
||||
|
||||
$this->bindRoutes();
|
||||
|
||||
$this['logger'] = $this->extend('logger', function () {
|
||||
return new Console\Logger\ConsoleLogger(new Console\Output\ConsoleOutput(Console\Output\ConsoleOutput::VERBOSITY_DEBUG));
|
||||
});
|
||||
$logger = false;
|
||||
$config = $this['configuration.store']->getConfig();
|
||||
if ((isset($config['console_logger_enabled_environments']) && in_array($environment, $config['console_logger_enabled_environments'])) || $environment == self::ENV_DEV){
|
||||
$logger = true;
|
||||
}
|
||||
|
||||
if ($logger){
|
||||
$this['logger'] = $this->extend('logger', function () {
|
||||
return new Console\Logger\ConsoleLogger(new Console\Output\ConsoleOutput(Console\Output\ConsoleOutput::VERBOSITY_DEBUG));
|
||||
});
|
||||
}
|
||||
|
||||
error_reporting(-1);
|
||||
ErrorHandler::register();
|
||||
|
Reference in New Issue
Block a user