Skip to content

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

@xiaoguo0426

Description

@xiaoguo0426

$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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions