# servces.yaml
services:
Monolog\Handler\TelegramBotHandler:
arguments:
- '%env(TELEGRAM_BOT_KEY)%'
- '%env(TELEGRAM_CHANNEL)%'
# monolog.yaml
monolog:
handlers:
message:
type: fingers_crossed
action_level: error
excluded_http_codes: [ 400, 401, 403, 404 ]
buffer_size: 50
handler: deduplicated
deduplicated:
type: deduplication
handler: telegram
telegram: # Важна только эта часть
type: service
id: Monolog\Handler\TelegramBotHandler
level: debug