src/phpDocumentor/Application.php
protected function addLogging()
    {
        $this->register(
            new MonologServiceProvider(),
            array(
                'monolog.name'      => 'phpDocumentor',
                'monolog.logfile'   => sys_get_temp_dir() . '/phpdoc.log',
                'monolog.debugfile' => sys_get_temp_dir() . '/phpdoc.debug.log',
                'monolog.level'     => Logger::INFO,
            )
        );

        $app = $this;
        /** @var Configuration $configuration */
        $configuration = $this['config'];
        $this['monolog.configure'] = $this->protect(
            function ($log) use ($app, $configuration) {
                $paths    = $configuration->getLogging()->getPaths();
                $logLevel = $configuration->getLogging()->getLevel();

                $app->configureLogger($log, $logLevel, $paths['default'], $paths['errors']);
            }
        );

        $this->extend(
            'console',
            function (ConsoleApplication $console) use ($configuration) {
                $console->getHelperSet()->set(new LoggerHelper());
                $console->getHelperSet()->set(new ConfigurationHelper($configuration));

                return $console;
            }
        );

        ErrorHandler::register($this['monolog']);
    }
protected function addLogging()
    {
        $this->register(
            new MonologServiceProvider(),
            array(
                'monolog.name'      => 'phpDocumentor',
                'monolog.logfile'   => sys_get_temp_dir() . '/phpdoc.log',
                'monolog.debugfile' => sys_get_temp_dir() . '/phpdoc.debug.log',
                'monolog.level'     => Logger::INFO,
            )
        );

        $app = $this;
        /** @var Configuration $configuration */
        $configuration = $this['config'];
        $this['monolog.configure'] = $this->protect(
            function ($log) use ($app, $configuration) {
                $paths    = $configuration->getLogging()->getPaths();
                $logLevel = $configuration->getLogging()->getLevel();

                $app->configureLogger($log, $logLevel, $paths['default'], $paths['errors']);
            }
        );

        $this->extend(
            'console',
            function (ConsoleApplication $console) use ($configuration) {
                $console->getHelperSet()->set(new LoggerHelper());
                $console->getHelperSet()->set(new ConfigurationHelper($configuration));

                return $console;
            }
        );

        ErrorHandler::register($this['monolog']);
    }
protected function addLogging ( ) { $ this -> register ( new MonologServiceProvider ( ) , array ( 'monolog.name' => 'phpDocumentor' , 'monolog.logfile' => sys_get_temp_dir ( ) . '/phpdoc.log' , 'monolog.debugfile' => sys_get_temp_dir ( ) . '/phpdoc.debug.log' , 'monolog.level' => Logger :: INFO , ) ) ; $ app = $ this ; /** @var Configuration $configuration */ $ configuration = $ this [ 'config' ] ; $ this [ 'monolog.configure' ] = $ this -> protect ( function ( $ log ) use ( $ app , $ configuration ) { $ paths = $ configuration -> getLogging ( ) -> getPaths ( ) ; $ logLevel = $ configuration -> getLogging ( ) -> getLevel ( ) ; $ app -> configureLogger ( $ log , $ logLevel , $ paths [ 'default' ] , $ paths [ 'errors' ] ) ; } ) ; $ this -> extend ( 'console' , function ( ConsoleApplication $ console ) use ( $ configuration ) { $ console -> getHelperSet ( ) -> set ( new LoggerHelper ( ) ) ; $ console -> getHelperSet ( ) -> set ( new ConfigurationHelper ( $ configuration ) ) ; return $ console ; } ) ; ErrorHandler :: register ( $ this [ 'monolog' ] ) ; }
Adds a logging provider to the container of phpDocumentor.

@return void
Adds a logging provider to the container of phpDocumentor .