public static function initializeSystemLogger(Bootstrap $bootstrap)
    {
        $configurationManager = $bootstrap->getEarlyInstance(ConfigurationManager::class);
        $settings = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Neos.Flow');

        $throwableStorage = self::initializeExceptionStorage($bootstrap);
        $bootstrap->setEarlyInstance(ThrowableStorageInterface::class, $throwableStorage);

        /** @var PsrLoggerFactoryInterface $psrLoggerFactoryName */
        $psrLoggerFactoryName = $settings['log']['psr3']['loggerFactory'];
        $psrLogConfigurations = $settings['log']['psr3'][$psrLoggerFactoryName] ?? [];
        if ($psrLoggerFactoryName === 'legacy') {
            $psrLoggerFactoryName = PsrLoggerFactory::class;
            $psrLogConfigurations = (new LoggerBackendConfigurationHelper($settings['log']))->getNormalizedLegacyConfiguration();
        }
        $psrLogFactory = $psrLoggerFactoryName::create($psrLogConfigurations);

        // This is all deprecated and can be removed with the removal of respective interfaces and classes.
        $loggerFactory = new LoggerFactory($psrLogFactory, $throwableStorage);
        $bootstrap->setEarlyInstance($psrLoggerFactoryName, $psrLogFactory);
        $bootstrap->setEarlyInstance(PsrLoggerFactoryInterface::class, $psrLogFactory);
        $bootstrap->setEarlyInstance(LoggerFactory::class, $loggerFactory);
        $deprecatedLogger = $settings['log']['systemLogger']['logger'] ?? Logger::class;
        $deprecatedLoggerBackend = $settings['log']['systemLogger']['backend'] ?? '';
        $deprecatedLoggerBackendOptions = $settings['log']['systemLogger']['backendOptions'] ?? [];
        $systemLogger = $loggerFactory->create('SystemLogger', $deprecatedLogger, $deprecatedLoggerBackend, $deprecatedLoggerBackendOptions);
        $bootstrap->setEarlyInstance(SystemLoggerInterface::class, $systemLogger);
    }
public static function initializeSystemLogger(Bootstrap $bootstrap)
    {
        $configurationManager = $bootstrap->getEarlyInstance(ConfigurationManager::class);
        $settings = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Neos.Flow');

        $throwableStorage = self::initializeExceptionStorage($bootstrap);
        $bootstrap->setEarlyInstance(ThrowableStorageInterface::class, $throwableStorage);

        /** @var PsrLoggerFactoryInterface $psrLoggerFactoryName */
        $psrLoggerFactoryName = $settings['log']['psr3']['loggerFactory'];
        $psrLogConfigurations = $settings['log']['psr3'][$psrLoggerFactoryName] ?? [];
        if ($psrLoggerFactoryName === 'legacy') {
            $psrLoggerFactoryName = PsrLoggerFactory::class;
            $psrLogConfigurations = (new LoggerBackendConfigurationHelper($settings['log']))->getNormalizedLegacyConfiguration();
        }
        $psrLogFactory = $psrLoggerFactoryName::create($psrLogConfigurations);

        // This is all deprecated and can be removed with the removal of respective interfaces and classes.
        $loggerFactory = new LoggerFactory($psrLogFactory, $throwableStorage);
        $bootstrap->setEarlyInstance($psrLoggerFactoryName, $psrLogFactory);
        $bootstrap->setEarlyInstance(PsrLoggerFactoryInterface::class, $psrLogFactory);
        $bootstrap->setEarlyInstance(LoggerFactory::class, $loggerFactory);
        $deprecatedLogger = $settings['log']['systemLogger']['logger'] ?? Logger::class;
        $deprecatedLoggerBackend = $settings['log']['systemLogger']['backend'] ?? '';
        $deprecatedLoggerBackendOptions = $settings['log']['systemLogger']['backendOptions'] ?? [];
        $systemLogger = $loggerFactory->create('SystemLogger', $deprecatedLogger, $deprecatedLoggerBackend, $deprecatedLoggerBackendOptions);
        $bootstrap->setEarlyInstance(SystemLoggerInterface::class, $systemLogger);
    }
public static function initializeSystemLogger ( Bootstrap $ bootstrap ) { $ configurationManager = $ bootstrap -> getEarlyInstance ( ConfigurationManager :: class ) ; $ settings = $ configurationManager -> getConfiguration ( ConfigurationManager :: CONFIGURATION_TYPE_SETTINGS , 'Neos.Flow' ) ; $ throwableStorage = self :: initializeExceptionStorage ( $ bootstrap ) ; $ bootstrap -> setEarlyInstance ( ThrowableStorageInterface :: class , $ throwableStorage ) ; /** @var PsrLoggerFactoryInterface $psrLoggerFactoryName */ $ psrLoggerFactoryName = $ settings [ 'log' ] [ 'psr3' ] [ 'loggerFactory' ] ; $ psrLogConfigurations = $ settings [ 'log' ] [ 'psr3' ] [ $ psrLoggerFactoryName ] ?? [ ] ; if ( $ psrLoggerFactoryName === 'legacy' ) { $ psrLoggerFactoryName = PsrLoggerFactory :: class ; $ psrLogConfigurations = ( new LoggerBackendConfigurationHelper ( $ settings [ 'log' ] ) ) -> getNormalizedLegacyConfiguration ( ) ; } $ psrLogFactory = $ psrLoggerFactoryName :: create ( $ psrLogConfigurations ) ; // This is all deprecated and can be removed with the removal of respective interfaces and classes. $ loggerFactory = new LoggerFactory ( $ psrLogFactory , $ throwableStorage ) ; $ bootstrap -> setEarlyInstance ( $ psrLoggerFactoryName , $ psrLogFactory ) ; $ bootstrap -> setEarlyInstance ( PsrLoggerFactoryInterface :: class , $ psrLogFactory ) ; $ bootstrap -> setEarlyInstance ( LoggerFactory :: class , $ loggerFactory ) ; $ deprecatedLogger = $ settings [ 'log' ] [ 'systemLogger' ] [ 'logger' ] ?? Logger :: class ; $ deprecatedLoggerBackend = $ settings [ 'log' ] [ 'systemLogger' ] [ 'backend' ] ?? '' ; $ deprecatedLoggerBackendOptions = $ settings [ 'log' ] [ 'systemLogger' ] [ 'backendOptions' ] ?? [ ] ; $ systemLogger = $ loggerFactory -> create ( 'SystemLogger' , $ deprecatedLogger , $ deprecatedLoggerBackend , $ deprecatedLoggerBackendOptions ) ; $ bootstrap -> setEarlyInstance ( SystemLoggerInterface :: class , $ systemLogger ) ; }
Initializes the System Logger

@param Bootstrap $bootstrap
@return void
Initializes the System Logger