Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Valet logs

I'm using laravel valet to serve sites in my local dev env, which is great. However, there's only one file in the expected location of ~/.valet/Log:

➜ ls ~/.valet/Log 
nginx-error.log

I've tinkered with php-fpm log settings and the nginx log settings, but I'm not sure that I'm even using the right config files, since I suspect that valet installs its own version of PHP and nginx.

Can any one tell me where the php / nginx config files for valet would be found, and what specific settings to change to drop the PHP error / log files where they're supposed to be written?

like image 372
user101289 Avatar asked Jan 30 '19 01:01

user101289


People also ask

How do I get Laravel logs?

By default, Laravel is configured to create a single log file for your application, and this file is stored in app/storage/logs/laravel. log .

What does Laravel valet do?

Laravel Valet is a development environment for macOS minimalists. Laravel Valet configures your Mac to always run Nginx in the background when your machine starts. Then, using DnsMasq, Valet proxies all requests on the *.test domain to point to sites installed on your local machine.

What is log in Laravel?

Laravel logging is based on "channels". Each channel represents a specific way of writing log information. For example, the single channel writes log files to a single log file, while the slack channel sends log messages to Slack. Log messages may be written to multiple channels based on their severity.

Can I use Laravel valet in Windows?

Laravel Valet configures your Windows to always run Nginx in the background when your machine starts. Then, using Acrylic DNS, Valet proxies all requests on the *. test domain to point to sites installed on your local machine.


1 Answers

Hopefully this helps with your question about the nginx config files. You can find the nginx configuration for your sites by running cd ~/.config/valet/Nginx in your terminal. To get to the base nginx config for valet use cd /usr/local/etc/nginx/valet. You should then see valet.conf, inside you can update the following lines to put the log files where you want them.

access_log "/Users/[user_id]/.config/valet/Log/access.log";
error_log "/Users/[user_id]/.config/valet/Log/nginx-error.log";

Make sure to run valet restart after you make changes to the valet.conf file.

like image 54
Jesse Hill Avatar answered Sep 21 '22 21:09

Jesse Hill