Issues (1)

src/LoggerFactory.php (1 issue)

1
<?php
2
3
namespace Bone\Log;
4
5
use Monolog\Handler\StreamHandler;
6
use Monolog\Logger;
7
8
class LoggerFactory
9
{
10
    /**
11
     * @param array $config
12
     * @return array
13
     * @throws \Exception
14
     */
15 1
    public function createLoggers(array $config): array
16
    {
17 1
        $logChannels = [];
18
19 1
        foreach ($config['channels'] as $name => $path) {
20 1
            $logger = new Logger($name);
21 1
            $logger->pushHandler(new StreamHandler($path, Logger::DEBUG));
0 ignored issues
show
Deprecated Code introduced by
The constant Monolog\Logger::DEBUG has been deprecated: Use \Monolog\Level::Debug ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

21
            $logger->pushHandler(new StreamHandler($path, /** @scrutinizer ignore-deprecated */ Logger::DEBUG));

This class constant has been deprecated. The supplier of the class has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the constant will be removed from the class and what other constant to use instead.

Loading history...
22 1
            $logChannels[$name] = $logger;
23
        }
24
25 1
        return $logChannels;
26
    }
27
}