public function createLogger($name)
    {
        // short circuit for cached logger objects
        if (true === array_key_exists($name, $this->_logger)) {
            return $this->_logger[$name];
        }

        $loggerConfig  = $this->_getLoggerConfig($name);
        $handlers      = $this->createHandlers($loggerConfig);
        $processors    = $this->createProcessors($loggerConfig);
        $logger        = new Monolog\Logger(
            $name,
            $handlers,
            $processors
        );

        // cache created logger
        $this->_logger[$name] = $logger;

        return $logger;
    }
public function createLogger($name)
    {
        // short circuit for cached logger objects
        if (true === array_key_exists($name, $this->_logger)) {
            return $this->_logger[$name];
        }

        $loggerConfig  = $this->_getLoggerConfig($name);
        $handlers      = $this->createHandlers($loggerConfig);
        $processors    = $this->createProcessors($loggerConfig);
        $logger        = new Monolog\Logger(
            $name,
            $handlers,
            $processors
        );

        // cache created logger
        $this->_logger[$name] = $logger;

        return $logger;
    }
public function createLogger ( $ name ) { // short circuit for cached logger objects if ( true === array_key_exists ( $ name , $ this -> _logger ) ) { return $ this -> _logger [ $ name ] ; } $ loggerConfig = $ this -> _getLoggerConfig ( $ name ) ; $ handlers = $ this -> createHandlers ( $ loggerConfig ) ; $ processors = $ this -> createProcessors ( $ loggerConfig ) ; $ logger = new Monolog \ Logger ( $ name , $ handlers , $ processors ) ; // cache created logger $ this -> _logger [ $ name ] = $ logger ; return $ logger ; }
Creates a single Monolog\Logger object depend on assigned logger name
and configuration. Created loggers are cached for multiusage.

@param string $name

@return Monolog\Logger

@throws MonologCreator\Exception
Creates a single Monolog \ Logger object depend on assigned logger name and configuration . Created loggers are cached for multiusage .