Where are logs located?

后端 未结 3 540
广开言路
广开言路 2020-12-10 00:53

I\'m debugging a JSON endpoint and need to view internal server errors. However, my app/storage/logs dir is empty and it seems there are no other directories de

相关标签:
3条回答
  • 2020-12-10 01:11

    You should be checking the root directory and not the app directory.

    Look in $ROOT/storage/laravel.log not app/storage/laravel.log, where root is the top directory of the project.

    0 讨论(0)
  • 2020-12-10 01:16
    • Ensure debug mode is on - either add APP_DEBUG=true to .env file or set an environment variable

    • Log files are in storage/logs folder. laravel.log is the default filename. If there is a permission issue with the log folder, Laravel just halts. So if your endpoint generally works - permissions are not an issue.

    • In case your calls don't even reach Laravel or aren't caused by code issues - check web server's log files (check your Apache/nginx config files to see the paths).

    • If you use PHP-FPM, check its log files as well (you can see the path to log file in PHP-FPM pool config).

    0 讨论(0)
  • 2020-12-10 01:23

    In Laravel 6, by default the logs are in:

    storage/logs/laravel.log

    0 讨论(0)
提交回复
热议问题