public function get(string $identifier): \Psr\Log\LoggerInterface
    {
        if (isset($this->instances[$identifier])) {
            return $this->instances[$identifier];
        }

        if (!isset($this->configuration[$identifier])) {
            throw new \InvalidArgumentException(sprintf('The given log identifier "%s" was not configured for the "%s" factory.', htmlspecialchars($identifier), self::class), 1515355505545);
        }

        if (!class_exists(Logger::class)) {
            throw new \Exception('To use the default logging you have to have the "neos/flow-log" package installed. It seems you miss it, so install it via "composer require neos/flow-log".', 1515437383589);
        }

        $backends = $this->instantiateBackends($this->configuration[$identifier]);

        $logger = new Logger($backends);
        $this->instances[$identifier] = $logger;
        return $logger;
    }
public function get(string $identifier): \Psr\Log\LoggerInterface
    {
        if (isset($this->instances[$identifier])) {
            return $this->instances[$identifier];
        }

        if (!isset($this->configuration[$identifier])) {
            throw new \InvalidArgumentException(sprintf('The given log identifier "%s" was not configured for the "%s" factory.', htmlspecialchars($identifier), self::class), 1515355505545);
        }

        if (!class_exists(Logger::class)) {
            throw new \Exception('To use the default logging you have to have the "neos/flow-log" package installed. It seems you miss it, so install it via "composer require neos/flow-log".', 1515437383589);
        }

        $backends = $this->instantiateBackends($this->configuration[$identifier]);

        $logger = new Logger($backends);
        $this->instances[$identifier] = $logger;
        return $logger;
    }
public function get ( string $ identifier ) : \ Psr \ Log \ LoggerInterface { if ( isset ( $ this -> instances [ $ identifier ] ) ) { return $ this -> instances [ $ identifier ] ; } if ( ! isset ( $ this -> configuration [ $ identifier ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The given log identifier "%s" was not configured for the "%s" factory.' , htmlspecialchars ( $ identifier ) , self :: class ) , 1515355505545 ) ; } if ( ! class_exists ( Logger :: class ) ) { throw new \ Exception ( 'To use the default logging you have to have the "neos/flow-log" package installed. It seems you miss it, so install it via "composer require neos/flow-log".' , 1515437383589 ) ; } $ backends = $ this -> instantiateBackends ( $ this -> configuration [ $ identifier ] ) ; $ logger = new Logger ( $ backends ) ; $ this -> instances [ $ identifier ] = $ logger ; return $ logger ; }
Get the logger configured with given identifier.
This implementation treats the logger as singleton.

@param string $identifier
@return \Psr\Log\LoggerInterface
@throws \Exception
Get the logger configured with given identifier . This implementation treats the logger as singleton .