Делаю по
офф. док.
У меня это выглядит так:
# config/packages/prod/monolog.yaml
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'
# or list of recipients
# to_email: ['dev1@example.com', 'dev2@example.com', ...]
subject: 'An Error Occurred! %%message%%'
level: debug
formatter: monolog.formatter.html
content_type: text/html
file_log:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
syslog_handler:
type: syslog
level: error
И
# config/packages/swiftmailer.yaml
swiftmailer:
transport: smtp
username: my_username
password: my_password
host: email-smtp.eu-west-1.amazonaws.com
port: 587
auth_mode: login
encryption: tls
local_domain: my_domain
spool: { type: 'memory' }
stream_options:
ssl:
verify_peer: false
verify_peer_name: false
Можно, пож, растолковать, как отправлять письма про ошибки. Одним словом, сделать, чтобы работало