U
U
usdbuy2021-03-03 16:29:41
symfony
usdbuy, 2021-03-03 16:29:41

Why can't the Symfony handler be processed in Monolog?

Hello everyone, please tell me why the Symfony handler can not be processed in Monolog?

I use Symfony 4.4

in services.yaml there is a handler

telegram_handler:
        class: App\Logger\Telegram\TelegramHandler


if I add to config/dev/monolog then everything works correctly!

monolog:
  handlers:
    main:
      type: stream
      path: "%kernel.logs_dir%/%kernel.environment%.log"
      level: debug
      channels: [ '!event' ]
    telegram:
      type: service
      channels: [ 'app' ]
      id: telegram_handler


but! if I add to config/prod/monolog, then no changes occur during deployment .. what could be wrong?

monolog:
  handlers:
    main:
      type: stream
      path: "%kernel.logs_dir%/%kernel.environment%.log"
      level: debug
      channels: [ '!event' ]
    telegram:
      type: service
      channels: [ 'app' ]
      id: telegram_handler

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question