* Delegating logger which delegates log messages received from the PSR-3 interface to the Joomla! Log object. * * @since 3.8.0 * @internal */final class DelegatingPsrLogger extends AbstractLogger{ /** * The Log instance to delegate messages to. * * @var Log * * @since 3.4 */ public function loadClass($class) { if ($result = $this->loader->loadClass($class)) { \JLoader::applyAliasFor($class); } return $result; } // Ensure a singleton instance has been created first if (empty(static::$instance)) { static::setInstance(new static()); } return new DelegatingPsrLogger(static::$instance); } /** * Returns a reference to the a Log object, only creating it if it doesn't already exist. * Note: This is principally made available for testing and internal purposes. { $container->alias('logger', LoggerInterface::class) ->share( LoggerInterface::class, function (Container $container) { return Log::createDelegatedLogger(); }, true ); }} ->share( 'JApplicationSite', function (Container $container) { $app = new SiteApplication($container->get(CMSInput::class), $container->get('config'), null, $container); $app->setDispatcher($container->get(DispatcherInterface::class)); $app->setLogger($container->get(LoggerInterface::class)); $app->setSession($container->get(SessionInterface::class)); $app->setUserFactory($container->get(UserFactoryInterface::class)); $app->setCacheControllerFactory($container->get(CacheControllerFactoryInterface::class)); $app->setMenuFactory($container->get(MenuFactoryInterface::class)); // ... die die();}// Run the application - All executable code should be triggered through this filerequire_once __DIR__ . '/includes/app.php';|
ClassNotFoundError
|
|---|
Symfony\Component\ErrorHandler\Error\ClassNotFoundError:
Attempted to load class "AbstractLogger" from namespace "Psr\Log".
Did you forget a "use" statement for another namespace?
at /home/samdyer/public_html/libraries/src/Log/DelegatingPsrLogger.php:26
at include()
(/home/samdyer/public_html/libraries/vendor/composer/ClassLoader.php:576)
at Composer\Autoload\{closure}('/home/samdyer/public_html/libraries/vendor/composer/../../../libraries/src/Log/DelegatingPsrLogger.php')
(/home/samdyer/public_html/libraries/vendor/composer/ClassLoader.php:427)
at Composer\Autoload\ClassLoader->loadClass('Joomla\\CMS\\Log\\DelegatingPsrLogger')
(/home/samdyer/public_html/libraries/src/Autoload/ClassLoader.php:59)
at Joomla\CMS\Autoload\ClassLoader->loadClass('Joomla\\CMS\\Log\\DelegatingPsrLogger')
(/home/samdyer/public_html/libraries/src/Log/Log.php:290)
at Joomla\CMS\Log\Log::createDelegatedLogger()
(/home/samdyer/public_html/libraries/src/Service/Provider/Logger.php:43)
at Joomla\CMS\Service\Provider\Logger->Joomla\CMS\Service\Provider\{closure}(object(Container))
(/home/samdyer/public_html/libraries/vendor/joomla/di/src/ContainerResource.php:162)
at Joomla\DI\ContainerResource->getInstance()
(/home/samdyer/public_html/libraries/vendor/joomla/di/src/Container.php:95)
at Joomla\DI\Container->get('Psr\\Log\\LoggerInterface')
(/home/samdyer/public_html/libraries/src/Service/Provider/Application.php:103)
at Joomla\CMS\Service\Provider\Application->Joomla\CMS\Service\Provider\{closure}(object(Container))
(/home/samdyer/public_html/libraries/vendor/joomla/di/src/ContainerResource.php:162)
at Joomla\DI\ContainerResource->getInstance()
(/home/samdyer/public_html/libraries/vendor/joomla/di/src/Container.php:95)
at Joomla\DI\Container->get('Joomla\\CMS\\Application\\SiteApplication')
(/home/samdyer/public_html/includes/app.php:52)
at require_once('/home/samdyer/public_html/includes/app.php')
(/home/samdyer/public_html/index.php:51)
|