symfony / monolog-bundle

Symfony Monolog Bundle
symfony.com
MIT License
2.89k stars 231 forks source link

Add priority field to processor tags #485

Open HypeMC opened 3 months ago

HypeMC commented 3 months ago

Continuation of #455.

Foo\Bar\Log\Processors\FirstProcessor:
    tags:
        - { name: monolog.processor, channel: http }

Foo\Bar\Log\Processors\SecondProcessor:
    tags:
        - { name: monolog.processor, channel: http, priority: -10 } # last

Foo\Bar\Log\Processors\ThirdProcessor:
    tags:
        - { name: monolog.processor, channel: http, priority: -20 } # very last
#[AsMonologProcessor(priority: -10)]
class SecondProcessor {}

#[AsMonologProcessor(priority: -20)]
class ThirdProcessor {}