Skip to content

Commit 83b6784

Browse files
authored
Fixed bug that cache and logger cannot support old config (#7715)
1 parent 3209e2e commit 83b6784

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/LoggerFactory.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ class LoggerFactory
3333
protected array $loggers = [];
3434

3535
public function __construct(protected ContainerInterface $container, protected ConfigInterface $config)
36-
{
37-
}
38-
39-
public function make(string $name = 'hyperf', ?string $channel = null): LoggerInterface
4036
{
4137
// Support old configuration style.
4238
if (
@@ -48,7 +44,10 @@ public function make(string $name = 'hyperf', ?string $channel = null): LoggerIn
4844
'channels' => $this->config->get('logger'),
4945
]);
5046
}
47+
}
5148

49+
public function make(string $name = 'hyperf', ?string $channel = null): LoggerInterface
50+
{
5251
$channel ??= $this->config->get('logger.default', 'default');
5352
$key = 'logger.channels.' . $channel;
5453

0 commit comments

Comments
 (0)