Skip to content
New issue

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

无法使用config()自定义log_level #3

Closed
xiaoguo0426 opened this issue Jun 8, 2020 · 2 comments · Fixed by #6
Closed

无法使用config()自定义log_level #3

xiaoguo0426 opened this issue Jun 8, 2020 · 2 comments · Fixed by #6

Comments

@xiaoguo0426
Copy link

$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

@Reasno
Copy link
Member

Reasno commented Jun 8, 2020

这个比较难抉择 两种写法各有优缺点

@xiaoguo0426
Copy link
Author

这个比较难抉择 两种写法各有优缺点

个人觉得还是用第一种写法会好点吧~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants