Laravel Homestead 中 PHP 错误日志的位置

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/40451172/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 14:42:25  来源:igfitidea点击:

Location of PHP error logs in Laravel Homestead

phplaravellogginglaravel-5laravel-routing

提问by

I'm currently experiencing routing issues, where various pages of my application are returning white pages.

我目前遇到路由问题,我的应用程序的各个页面都返回白页。

Where are the PHP logs located within Homestead Vagrant so I can diagnose what's the issue?

Homestead Vagrant 中的 PHP 日志在哪里,以便我可以诊断出问题所在?

I've checked /var/log/and I can only see a php7.0-fpm.logthat relates to PHP, but nothing is generated within here when I read it.

我已经检查过/var/log/,我只能看到php7.0-fpm.log与 PHP 相关的一个,但是当我阅读它时,这里没有生成任何内容。

回答by Ryan

I just had this problem too.

我也刚遇到这个问题。

Finally I figured out that it was because my custom Laravel code (that I'd downloaded from my Bitbucket repo onto a new computer) included custom code in bootstrap/app.phpat the $app->configureMonologUsingline, and I hadn't properly set up a new .envfile.

最后我想通了,那是因为我的自定义代码Laravel(我会从我的到位桶回购下载到一台新计算机),包括自定义代码中bootstrap/app.php$app->configureMonologUsing行,我没有正确设置一个新的.env文件。

I guess it can be dangerous / fragile to mess with the default logger.

我想弄乱默认记录器可能很危险/脆弱。

But now that I fixed my .env, the logs correctly appear in /storage/logs/laravel.log.

但是现在我修复了我的.env,日志正确地出现在/storage/logs/laravel.log.