[Issue-380] Throw exception if log_dir is defined but doesn't exists

This commit is contained in:
Andrés Montañez
2018-03-29 16:48:14 -03:00
parent 1c654e4eac
commit ceb07a306f
4 changed files with 27 additions and 0 deletions
+3
View File
@@ -84,6 +84,9 @@ class MageApplication extends Application
$logger = new Logger('magephp');
$logger->pushHandler(new StreamHandler($logfile));
} elseif (array_key_exists('log_dir', $config['magephp']) && !is_dir($config['magephp']['log_dir'])) {
throw new RuntimeException(sprintf('The configured log_dir "%s" does not exists or is not a directory.', $config['magephp']['log_dir']));
}
$this->runtime->setConfiguration($config['magephp']);