在 Symfony 3 中,无论如何我可以在不设置调试模式的情况下将所有错误写入生产日志?错误将包括 http 500 错误或应用程序错误或 php 错误,这些错误是由于在生产中将错误标志设置为 false 而被静音的。
生产的当前日志配置是
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]
Run Code Online (Sandbox Code Playgroud)