| Total Complexity | 3 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Monolog extends AbstractSystem |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var \BFW\Monolog $monolog The monolog system for bfw channel |
||
| 9 | */ |
||
| 10 | protected $monolog; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Initialize all monolog handlers declared for bfw channel |
||
| 14 | */ |
||
| 15 | public function __construct() |
||
| 16 | { |
||
| 17 | $config = \BFW\Application::getInstance()->getConfig(); |
||
| 18 | $this->monolog = new \BFW\Monolog('bfw', $config); |
||
| 19 | $this->monolog->addAllHandlers('handlers', 'monolog.php'); |
||
| 20 | |||
| 21 | $this->monolog->getLogger()->debug( |
||
| 22 | 'Currently during the initialization framework step.' |
||
| 23 | ); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | * |
||
| 29 | * @return \BFW\Monolog |
||
| 30 | */ |
||
| 31 | public function __invoke() |
||
| 32 | { |
||
| 33 | return $this->monolog; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return \BFW\Monolog |
||
| 38 | */ |
||
| 39 | public function getMonolog() |
||
| 42 | } |
||
| 43 | } |
||
| 44 |