0

i can't use this handler in monolog configuration : https://github.com/symfony/symfony/blob/5.4/src/Symfony/Bridge/Monolog/Handler/NotifierHandler.php

monolog:
  handlers:
    discord:
      type: notifier
      action_level: error

this is the error message : There is no handler class defined for handler "notifier".

How can i inject this handler ?

BR, Thomas

gp_sflover
  • 3,460
  • 5
  • 38
  • 48
Thomas
  • 1
  • 1
  • Please don't add answers inside the question. If you find a solution, you can Answer your own question adding it in "Your Answer" section. – gp_sflover Jul 16 '21 at 11:13

1 Answers1

0

You can add the notifier handler to services.yaml

See: https://manyou.blog/send-symfony-logs-to-slack-with-symfony-notifier-as-a-monolog-handler#heading-add-notifierhandler-as-service

Bohan Yang
  • 91
  • 1
  • 5