Skip to content

Autoconfigure resettable processors with the kernel.reset tag #361

@alexandre-abrioux

Description

@alexandre-abrioux

Hi,

As of writing this, handlers implementing the monolog ResettableInterface are correctly configured with the Symfony kernel.reset service tag.

See here:

if (!in_array($handlerId, $this->nestedHandlers) && is_subclass_of($handlerClass, ResettableInterface::class)) {
$definition->addTag('kernel.reset', ['method' => 'reset']);
}

I suggest we should do the same thing for processors implementing the monolog ResettableInterface.

It could be handy for the auto-configuration of the UidProcessor for instance: https://github.com/Seldaek/monolog/blob/master/src/Monolog/Processor/UidProcessor.php

If it is something that you would be interested in I could write a PR, I'm just asking for your opinion about that idea first :)

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions