AppserverIo\Appserver\Application\Application::addLogger PHP Метод

addLogger() публичный Метод

Injects the logger instance and the configuration.
public addLogger ( Psr\Log\LoggerInterface $logger, AppserverIo\Appserver\Core\Api\Node\LoggerNodeInterface $configuration ) : void
$logger Psr\Log\LoggerInterface A provisioner instance
$configuration AppserverIo\Appserver\Core\Api\Node\LoggerNodeInterface The provisioner configuration
Результат void
    public function addLogger(LoggerInterface $logger, LoggerNodeInterface $configuration)
    {
        // bind the logger callback to the naming directory => the application itself
        $this->getNamingDirectory()->bind(sprintf('php:global/log/%s/%s', $this->getUniqueName(), $configuration->getName()), array(&$this, 'getLogger'), array($configuration->getName()));
        // add the logger instance to the application
        $this->loggers[$configuration->getName()] = $logger;
    }