禁用Laravel登录? [英] Disable logging in Laravel?
本文介绍了禁用Laravel登录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有全局配置选项可禁用所有日志记录?
Is there any global configuration option to disable all logging?
我不仅仅意味着禁用错误记录.我的意思是实际上在调用Log ::时禁止写入文件.
I don't just mean disabling the logging of errors. I mean actually disabling writing to the file when Log:: is called.
推荐答案
如果不想写入日志文件,只需在文件start/global.php
If you don't want to write to a log file you can simply comment out the following line in file start/global.php
//Log::useFiles(storage_path().'/logs/laravel.log');
从现在开始,您的日志文件将永远不会更新.
From this point on, your log file will never be updated.
这篇关于禁用Laravel登录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文