Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add autowiring aliases #211

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion DependencyInjection/MonologExtension.php
Expand Up @@ -52,7 +52,6 @@ public function load(array $configs, ContainerBuilder $container)
if (isset($config['handlers'])) {
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('monolog.xml');
$container->setAlias('logger', 'monolog.logger');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chalasr can you add this patch to your PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


$container->setParameter('monolog.use_microseconds', $config['use_microseconds']);

Expand Down
1 change: 1 addition & 0 deletions Resources/config/monolog.xml
Expand Up @@ -13,6 +13,7 @@
</service>

<service id="logger" alias="monolog.logger" />
<service id="Psr\Log\LoggerInterface" alias="logger" public="false" />

<service id="monolog.logger_prototype" class="Symfony\Bridge\Monolog\Logger" abstract="true">
<argument /><!-- Channel -->
Expand Down