public function getLogger($channel = 'default')
    {
        if (isset($this->loggers[$channel])) {
            return $this->loggers[$channel];
        }

        /** @var Logger $logger */
        $logger = $this->getContainer()->get(LoggerInterface::class, [$channel]);

        $this->loggers[$channel] = $logger;

        /** @var LoggerInterface $contract */
        $contract = $this->validateContract($this->loggers[$channel], LoggerInterface::class);
        return $contract;
    }
public function getLogger($channel = 'default')
    {
        if (isset($this->loggers[$channel])) {
            return $this->loggers[$channel];
        }

        /** @var Logger $logger */
        $logger = $this->getContainer()->get(LoggerInterface::class, [$channel]);

        $this->loggers[$channel] = $logger;

        /** @var LoggerInterface $contract */
        $contract = $this->validateContract($this->loggers[$channel], LoggerInterface::class);
        return $contract;
    }
public function getLogger ( $ channel = 'default' ) { if ( isset ( $ this -> loggers [ $ channel ] ) ) { return $ this -> loggers [ $ channel ] ; } /** @var Logger $logger */ $ logger = $ this -> getContainer ( ) -> get ( LoggerInterface :: class , [ $ channel ] ) ; $ this -> loggers [ $ channel ] = $ logger ; /** @var LoggerInterface $contract */ $ contract = $ this -> validateContract ( $ this -> loggers [ $ channel ] , LoggerInterface :: class ) ; return $ contract ; }
Return a logger

@param string $channel
@return \Psr\Log\LoggerInterface
Return a logger