protected function _create($class, $alias, $settings)
    {
        if (is_callable($class)) {
            $class = $class($alias);
        }

        if (is_object($class)) {
            $instance = $class;
        }

        if (!isset($instance)) {
            $instance = new $class($settings);
        }

        if ($instance instanceof LoggerInterface) {
            return $instance;
        }

        throw new RuntimeException(
            'Loggers must implement Psr\Log\LoggerInterface.'
        );
    }
protected function _create($class, $alias, $settings)
    {
        if (is_callable($class)) {
            $class = $class($alias);
        }

        if (is_object($class)) {
            $instance = $class;
        }

        if (!isset($instance)) {
            $instance = new $class($settings);
        }

        if ($instance instanceof LoggerInterface) {
            return $instance;
        }

        throw new RuntimeException(
            'Loggers must implement Psr\Log\LoggerInterface.'
        );
    }
protected function _create ( $ class , $ alias , $ settings ) { if ( is_callable ( $ class ) ) { $ class = $ class ( $ alias ) ; } if ( is_object ( $ class ) ) { $ instance = $ class ; } if ( ! isset ( $ instance ) ) { $ instance = new $ class ( $ settings ) ; } if ( $ instance instanceof LoggerInterface ) { return $ instance ; } throw new RuntimeException ( 'Loggers must implement Psr\Log\LoggerInterface.' ) ; }
Create the logger instance.

Part of the template method for Cake\Core\ObjectRegistry::load()

@param string|\Psr\Log\LoggerInterface $class The classname or object to make.
@param string $alias The alias of the object.
@param array $settings An array of settings to use for the logger.
@return \Psr\Log\LoggerInterface The constructed logger class.
@throws \RuntimeException when an object doesn't implement the correct interface.
Create the logger instance .