monolog-bundle icon indicating copy to clipboard operation
monolog-bundle copied to clipboard

Make each handler type have its own extension class

Open GromNaN opened this issue 1 month ago • 2 comments

Q A
Branch? 3.x
Bug fix? no
New feature? yes
Deprecations? no (not yet)
Issues Fix #558
License MIT

This is a partial PR to gather feedbacks.

  • Each Monolog handler has its own configuration and extension class
  • Some handlers can share the same with different properties (name, handler class)
  • They are all registered in the MonologExtension
  • 3rd party bundles can add their own handler extension classes

GromNaN avatar Nov 26 '25 09:11 GromNaN

  • depending on where the Configuration class is accessed, the extensions might be registered or no (we have that issue in SecurityBundle, which is the only bundle I'm aware of doing such thing

knplabs/knp-gaufrette-bundle, liip/imagine-bundle, payum/payum-bundle, and sylius/theme-bundle all do something similar

mbabker avatar Dec 02 '25 13:12 mbabker

Could this also be used to pass the handler's FQCN as type, rather than some string?:

'handlers' => [
    'foobar' => [
        'type' => StreamHandler::class

ThomasLandauer avatar Dec 08 '25 22:12 ThomasLandauer