diff --git a/src/Factory/FormatterPluginManagerFactory.php b/src/Factory/FormatterPluginManagerFactory.php index d5915c0..64d6912 100644 --- a/src/Factory/FormatterPluginManagerFactory.php +++ b/src/Factory/FormatterPluginManagerFactory.php @@ -16,7 +16,9 @@ public function createService(ServiceLocatorInterface $serviceLocator) { $config = $serviceLocator->get('Config'); $configInstance = new Config($config['monolog']['formatter_plugin_manager']); + $formatterPluginManager = new FormatterPluginManager($configInstance); + $formatterPluginManager->setServiceLocator($serviceLocator); - return new FormatterPluginManager($configInstance); + return $formatterPluginManager; } } diff --git a/src/Factory/HandlerPluginManagerFactory.php b/src/Factory/HandlerPluginManagerFactory.php index 73d5ad6..2fcef3c 100644 --- a/src/Factory/HandlerPluginManagerFactory.php +++ b/src/Factory/HandlerPluginManagerFactory.php @@ -16,7 +16,9 @@ public function createService(ServiceLocatorInterface $serviceLocator) { $config = $serviceLocator->get('Config'); $configInstance = new Config($config['monolog']['handler_plugin_manager']); + $handlerPluginManager = new HandlerPluginManager($configInstance); + $handlerPluginManager->setServiceLocator($serviceLocator); - return new HandlerPluginManager($configInstance); + return $handlerPluginManager; } }