Skip to content

Conversation

@wpottier
Copy link

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

Marked nested handlers with not be pushed to the logger handler array.
This options may be usefull when using custom handler (as service type handlers) which rely on a sub handler defined in the monolog-bundle configuration.
Marking this subhandler as nested avoid monolog to directly call it.

Sample Usage

monolog:
    handlers:
        foo:
            type: service
            id: my_site.custom_log_handler
        bar:
            type:  stream
            path:  "%kernel.logs_dir%/%kernel.environment%-bar.log"
            level: debug
            nested: true

services:
    my_site.custom_log_handler:
        class: AppBundle\Logger\CustomHandler
        arguments:
            - "@monolog.handler.bar"

Marked nested handlers with not be pushed to the logger handler array.
This options may be usefull when using custom handler (as service type handlers) wich rely on a sub handler defined in the monolog-bundle configuration.
Marking this subhandler as nested avoid monolog to directly call it.
@wpottier
Copy link
Author

May i've missed something or this PR didn't interested you?

Seldaek added a commit that referenced this pull request Mar 13, 2016
Add a nested option on handler config definition
@Seldaek Seldaek merged commit 4cb2abb into symfony:master Mar 13, 2016
@Seldaek
Copy link
Member

Seldaek commented Mar 13, 2016

No it looks good to me, I just missed it :)

@wpottier
Copy link
Author

no problem. thanks a lot for your work !

@wpottier wpottier deleted the add_nested_option_for_handler branch March 13, 2016 15:50
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