由网络副手--寻路人于2019.01.10 00:48:12发布在Laravel框架 Laravel 日志去掉stack trace 阅读4773 评论0 喜欢0 一、 Setting APP_DEBUG=false in your .env file works fine for the frontend. If you don't want the stack trace lines to be outputted in the log files only, try this. 二、 In /app/Exceptions/Handler.php add use Log; at the top, then add this in the report function: Log::error('['.$e->getCode().'] "'.$e->getMessage().'" on line '.$e->getTrace()[0]['line'].' of file '.$e->getTrace()[0]['file']); And remove: parent::report($e); 赞 0 分享 赏 您可以选择一种方式赞助本站 支付宝扫码赞助 BraveDu 署名: 网络副手~寻路人