We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$app->config([ StdoutLoggerInterface::class => [ 'log_level' => [ LogLevel::ALERT ] ] ]); 这种写法无法自定义log_level。 当然, $app->getContainer()->get(ConfigInterface::class)->set(StdoutLoggerInterface::class, [ 'log_level' => [ LogLevel::ALERT ] ]); 这种写法是可以的。
$app->config([ StdoutLoggerInterface::class => [ 'log_level' => [ LogLevel::ALERT ] ] ]);
$app->getContainer()->get(ConfigInterface::class)->set(StdoutLoggerInterface::class, [ 'log_level' => [ LogLevel::ALERT ] ]);
个人建议 https://github.com/hyperf/nano/blob/master/src/App.php#L318 将array_merge_recursive 改为 array_merge
The text was updated successfully, but these errors were encountered:
这个比较难抉择 两种写法各有优缺点
Sorry, something went wrong.
个人觉得还是用第一种写法会好点吧~~
Successfully merging a pull request may close this issue.
$app->config([ StdoutLoggerInterface::class => [ 'log_level' => [ LogLevel::ALERT ] ] ]);
这种写法无法自定义log_level。
当然,
$app->getContainer()->get(ConfigInterface::class)->set(StdoutLoggerInterface::class, [ 'log_level' => [ LogLevel::ALERT ] ]);
这种写法是可以的。个人建议 https://github.com/hyperf/nano/blob/master/src/App.php#L318 将array_merge_recursive 改为 array_merge
The text was updated successfully, but these errors were encountered: