protected static function configureLogging()
    {
        // 1st get collecting logging
        $collectingLogger = self::$registry->getLogging()->getLogger('collecting');

        // 2nd get existing log content
        $collection = $collectingLogger->getCollectionRaw();

        // Check if logging enabled ...
        if (true === self::$registry->getParameter('doozr.kernel.logging')) {

            // Remove collecting logging
            self::$registry->getLogging()->detachAll(true);

            // Iterate and attach to subsystem
            foreach (self::$registry->getConfiguration()->kernel->logging->logger as $logger) {
                $loggerInstance = self::$registry->getContainer()->build(
                    'doozr.logging.'.strtolower($logger->name),
                    [
                        (isset($logger->level)) ? $logger->level : self::$registry->getLogging()->getDefaultLoglevel(),
                    ]
                );

                // Attach the logging
                self::$registry->getLogging()->attach($loggerInstance);
            }

            foreach ($collection as $key => $entry) {
                self::$registry->getLogging()->log(
                    $entry['type'],
                    $entry['message'],
                    unserialize($entry['context']),
                    $entry['time'],
                    $entry['fingerprint'],
                    $entry['separator']
                );
            }
        } else {
            // Disable logging (+ dispatching ...)
            self::$registry->getLogging()->detachAll(true);
        }

        // Important for bootstrap result
        return true;
    }
protected static function configureLogging()
    {
        // 1st get collecting logging
        $collectingLogger = self::$registry->getLogging()->getLogger('collecting');

        // 2nd get existing log content
        $collection = $collectingLogger->getCollectionRaw();

        // Check if logging enabled ...
        if (true === self::$registry->getParameter('doozr.kernel.logging')) {

            // Remove collecting logging
            self::$registry->getLogging()->detachAll(true);

            // Iterate and attach to subsystem
            foreach (self::$registry->getConfiguration()->kernel->logging->logger as $logger) {
                $loggerInstance = self::$registry->getContainer()->build(
                    'doozr.logging.'.strtolower($logger->name),
                    [
                        (isset($logger->level)) ? $logger->level : self::$registry->getLogging()->getDefaultLoglevel(),
                    ]
                );

                // Attach the logging
                self::$registry->getLogging()->attach($loggerInstance);
            }

            foreach ($collection as $key => $entry) {
                self::$registry->getLogging()->log(
                    $entry['type'],
                    $entry['message'],
                    unserialize($entry['context']),
                    $entry['time'],
                    $entry['fingerprint'],
                    $entry['separator']
                );
            }
        } else {
            // Disable logging (+ dispatching ...)
            self::$registry->getLogging()->detachAll(true);
        }

        // Important for bootstrap result
        return true;
    }
protected static function configureLogging ( ) { // 1st get collecting logging $ collectingLogger = self :: $ registry -> getLogging ( ) -> getLogger ( 'collecting' ) ; // 2nd get existing log content $ collection = $ collectingLogger -> getCollectionRaw ( ) ; // Check if logging enabled ... if ( true === self :: $ registry -> getParameter ( 'doozr.kernel.logging' ) ) { // Remove collecting logging self :: $ registry -> getLogging ( ) -> detachAll ( true ) ; // Iterate and attach to subsystem foreach ( self :: $ registry -> getConfiguration ( ) -> kernel -> logging -> logger as $ logger ) { $ loggerInstance = self :: $ registry -> getContainer ( ) -> build ( 'doozr.logging.' . strtolower ( $ logger -> name ) , [ ( isset ( $ logger -> level ) ) ? $ logger -> level : self :: $ registry -> getLogging ( ) -> getDefaultLoglevel ( ) , ] ) ; // Attach the logging self :: $ registry -> getLogging ( ) -> attach ( $ loggerInstance ) ; } foreach ( $ collection as $ key => $ entry ) { self :: $ registry -> getLogging ( ) -> log ( $ entry [ 'type' ] , $ entry [ 'message' ] , unserialize ( $ entry [ 'context' ] ) , $ entry [ 'time' ] , $ entry [ 'fingerprint' ] , $ entry [ 'separator' ] ) ; } } else { // Disable logging (+ dispatching ...) self :: $ registry -> getLogging ( ) -> detachAll ( true ) ; } // Important for bootstrap result return true ; }
Configures logging. It attaches the real configured loggers from configuration and removes
the collecting logging. This method also injects the collected entries into the new attached loggers.

@author Benjamin Carl <opensource@clickalicious.de>

@return bool TRUE on success
@static
Configures logging . It attaches the real configured loggers from configuration and removes the collecting logging . This method also injects the collected entries into the new attached loggers .