mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Merge pull request #1083 from vibbow/develop
Update Logger to cache log handler.
This commit is contained in:
commit
b269aa8204
@ -364,10 +364,14 @@ class Logger implements LoggerInterface
|
||||
|
||||
foreach ($this->handlerConfig as $className => $config)
|
||||
{
|
||||
if ( ! array_key_exists($className, $this->handlers)) {
|
||||
$this->handlers[$className] = new $className($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* @var \CodeIgniter\Log\Handlers\HandlerInterface
|
||||
*/
|
||||
$handler = new $className($config);
|
||||
$handler = $this->handlers[$className];
|
||||
|
||||
if ( ! $handler->canHandle($level))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user