【发布时间】:2018-12-16 21:51:08
【问题描述】:
我正在使用 symfony 文档页面中的示例配置通过电子邮件 https://symfony.com/doc/2.8/logging/monolog_email.html 发送日志
monolog:
handlers:
main:
type: fingers_crossed
# 500 errors are logged at the critical level
action_level: critical
# to also log 400 level errors (but not 404's):
# action_level: error
# excluded_404s:
# - ^/
handler: deduplicated
deduplicated:
type: deduplication
handler: swift
swift:
type: swift_mailer
from_email: 'error@example.com'
to_email: 'error@example.com'
subject: 'An Error Occurred! %%message%%'
level: debug
formatter: monolog.formatter.html
content_type: text/html
我收到一个错误 为处理程序“去重”提供的处理程序类型“去重”无效
我不确定出了什么问题,因为我所做的与文档中的完全相同,或者我必须配置一些东西。
【问题讨论】:
-
你安装了哪个独白版本?
-
这个 "symfony/monolog-bundle": "2.8.1",
-
此功能是在1.19 版本的
monolog/monolog中添加的。您正在使用 1.8 请参阅包 dependencies 的symfony/monolog-bundle
标签: php symfony symfony-2.8 monolog symfony3.x