8000 [MonologBridge] add LoggerProxy by havvg · Pull Request #9107 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[MonologBridge] add LoggerProxy #9107

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

Closed
wants to merge 1 commit into from

Conversation

havvg
Copy link
Contributor
@havvg havvg commented Sep 23, 2013
Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
License MIT

This allows easy setup for setter injected logger writing to different channels. http://symfony.com/doc/current/reference/dic_tags.html#dic-tags-monolog

Example service:

services:
    my_logger.my_channel:
        class: Symfony\Bridge\Monolog\LoggerProxy
        arguments:
            - '@logger'
        tags:
            - { name: 'monolog.logger', channel: 'my_channel' }

I'm not exactly sure, whether this is the best way of solving it, but I don't want to clutter constructors just because of this limitation :-)

@stof
Copy link
Member
stof commented Sep 23, 2013

This is not needed. Using a custom channel on setter injection is supported since MonologBundle 2.1

@stof stof closed this Sep 23, 2013
@stof
Copy link
Member
stof commented Sep 23, 2013

I opened a doc ticket for this: symfony/symfony-docs#3005

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0