dispatcher = $dispatcher; } /** * Register a file log handler. * * @param string $path * @param string $level * * @return void */ public function useFiles($path, $level = 'debug') { foreach ($this->loggers as $logger) { if ($logger instanceof Log) { $logger->useFiles($path, $level); } } } /** * Register a daily file log handler. * * @param string $path * @param int $days * @param string $level * * @return void */ public function useDailyFiles($path, $days = 0, $level = 'debug') { foreach ($this->loggers as $logger) { if ($logger instanceof Log) { $logger->useDailyFiles($path, $days, $level); } } } /** * Get the underlying Monolog instance. * * @return \Monolog\Logger */ public function getMonolog() { foreach ($this->loggers as $logger) { if (is_callable([$logger, 'getMonolog'])) { $monolog = $logger->getMonolog(); if ($monolog === null) { continue; } return $monolog; } } } }