public function addLogger(LoggerInterface $logger, LoggerNodeInterface $configuration)
    {

        // bind the logger callback to the naming directory => the application itself
        $this->getNamingDirectory()->bind($name = sprintf('php:global/log/%s/%s', $this->getUniqueName(), $configuration->getName()), array(&$this, 'getLogger'), array($configuration->getName()));

        // alos bind a reference from the application to the logger scope (to make DI more comfortable)
        $this->getNamingDirectory()->bindReference(sprintf('php:global/%s/%s', $this->getUniqueName(), $configuration->getName()), $name);

        // add the logger instance to the application
        $this->loggers[$configuration->getName()] = $logger;
    }
public function addLogger(LoggerInterface $logger, LoggerNodeInterface $configuration)
    {

        // bind the logger callback to the naming directory => the application itself
        $this->getNamingDirectory()->bind($name = sprintf('php:global/log/%s/%s', $this->getUniqueName(), $configuration->getName()), array(&$this, 'getLogger'), array($configuration->getName()));

        // alos bind a reference from the application to the logger scope (to make DI more comfortable)
        $this->getNamingDirectory()->bindReference(sprintf('php:global/%s/%s', $this->getUniqueName(), $configuration->getName()), $name);

        // add the logger instance to the application
        $this->loggers[$configuration->getName()] = $logger;
    }
public function addLogger ( LoggerInterface $ logger , LoggerNodeInterface $ configuration ) { // bind the logger callback to the naming directory => the application itself $ this -> getNamingDirectory ( ) -> bind ( $ name = sprintf ( 'php:global/log/%s/%s' , $ this -> getUniqueName ( ) , $ configuration -> getName ( ) ) , array ( & $ this , 'getLogger' ) , array ( $ configuration -> getName ( ) ) ) ; // alos bind a reference from the application to the logger scope (to make DI more comfortable) $ this -> getNamingDirectory ( ) -> bindReference ( sprintf ( 'php:global/%s/%s' , $ this -> getUniqueName ( ) , $ configuration -> getName ( ) ) , $ name ) ; // add the logger instance to the application $ this -> loggers [ $ configuration -> getName ( ) ] = $ logger ; }
Injects the logger instance and the configuration.

@param \Psr\Log\LoggerInterface                                 $logger        A provisioner instance
@param \AppserverIo\Appserver\Core\Api\Node\LoggerNodeInterface $configuration The provisioner configuration

@return void
Injects the logger instance and the configuration .