【发布时间】:2023-03-03 10:59:01
【问题描述】:
在 Symfony 3 中,我是否可以在不设置调试模式的情况下将所有错误写入生产日志?错误将包括 http 500 错误或应用程序错误或由于在生产中设置为 false 的错误标志而被静音的 php 错误。
当前的生产日志配置是
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: info
channels: [!request, !event, !translation, !kernel, !security, !php, !snc_redis]
php:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%_php.log"
level: warning
channels: [php]
【问题讨论】: