Disable logging in Laravel?

删除回忆录丶 提交于 2020-01-06 11:15:27

问题


Is there any global configuration option to disable all logging?

I don't just mean disabling the logging of errors. I mean actually disabling writing to the file when Log:: is called.


回答1:


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.



来源:https://stackoverflow.com/questions/26321898/disable-logging-in-laravel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!