作者:独艺无二的爱 | 来源:互联网 | 2022-12-05 16:00
我有网络应用程序,用symfony-flex构建,用于部署我使用capistrano.为了记录关键日志,我已经以这种方式配置了monolog:
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
channels: ['!translation']
excluded_http_codes: [{ 404: ['^/security/login'] }]
handler: grouped
grouped:
type: group
members: [deduplicated]
deduplicated:
type: deduplication
handler: swift
swift:
type: swift_mailer
from_email: '%mailer_user%'
to_email: ['email1@gmail.com', 'email2@gmail.com']
subject: " %%level_name%% %%level%%"
level: info
formatter: monolog.formatter.html
content_type: text/html
SwiftMailer配置:
swiftmailer:
url: '%env(MAILER_URL)%'
spool: { type: 'memory' }
除了每次发布后的日志,一切正常.我收到之前发送过的旧日志.例:
也许我错过了配置中的一些东西?