Skip to content

Commit

Permalink
修改error_report默认值和RELEASE常量默认值
Browse files Browse the repository at this point in the history
  • Loading branch information
titrxw committed Jul 17, 2019
1 parent b9cd40f commit 44155ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Src/Console/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function doRun(InputInterface $input, OutputInterface $output) {
private function registerErrorHandler() {
//设置了错误级别后只会收集错误级别内的日志, 容器确认后, 系统设置进行归类处理
$setting = iconfig()->getUserAppConfig('setting');
$errorLevel = $setting['error_level'] ?? -1;
$errorLevel = $setting['error_level'] ?? ((ENV & RELEASE) === RELEASE ? E_ALL^E_NOTICE : -1);
error_reporting($errorLevel);

/**
Expand Down
2 changes: 1 addition & 1 deletion Src/Core/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function __construct() {
unset($env);

//在加载配置前定义需要的常量
!defined('RELEASE') && define('RELEASE', 0);
!defined('RELEASE') && define('RELEASE', 8);
!defined('DEBUG') && define('DEBUG', 1);
!defined('CLEAR_LOG') && define('CLEAR_LOG', 2);
!defined('BACKTRACE') && define('BACKTRACE', 4);
Expand Down

0 comments on commit 44155ce

Please sign in to comment.