Preface
The account login reported a 500 error, and no error message was returned. There was no way to use the original method, and it has been printed line by line. arrive Log::info()
The problem cannot be displayed normally later, so the problem is found.
The problem of not being able to write the log is because the file added when the code is updated is the root user, so the creation of the log file is also the root permission, which causes the www permissions of other users to be unable to write to the log file.
Therefore, the user permissions to modify storage/logs/ are www
chown www:www storage/logs -R
Notice:If the user uses the supervisord service to run the queue, if there is logging in the queue, the running user also needs to be changed to www user.
Question 2
The same is a problem that the log cannot be recorded, this is the local environmentphp artisan queue:work --sleep=3 --tries=3
run.
Also, when writing logs in the job, the permissions are correct, but the log cannot be recorded and the task is executed normally.
Finally, I thought of restarting the queue to solve this problem, but I don’t know what caused it. If you have any knowledge, please let me know.
Restart queue command
php artisan queue:restart
Other log-in-related issues
Question 1
Recently I've been using the Zizaco\Entrust permission package...
When adding a character... I reported an error...
BadMethodCallException in line 391: This cache store does not support tagging.
There should be a place in this package that uses laravel cache, and the default cache is file
Put the .env inCACHE_DRIVER
Change toCACHE_DRIVER=array
Question 2
This error appears on the page
View [.] not found.
Solutions, optimization, clear configuration cache, routing cache
php artisan optimize --force php artisan config:cache php artisan route:cache
Summarize
The above is the entire content of this article. I hope that the content of this article will be of certain help to everyone’s study or work. If you have any questions, you can leave a message to communicate. Thank you for your support.