symfony project development server in WSL1 logs error message every second -> how to control PHP-FPM and WebServer logs

 To control the logs generated by PHP-FPM and the web server in a Symfony project running on WSL1, you can follow these steps:

  1. Determine the location of the log files for PHP-FPM and the web server. In Symfony, the default log directory is var/log/.

  2. Edit the configuration files for PHP-FPM and the web server to adjust the logging level or disable logging altogether. The exact configuration files and syntax will depend on the specific web server and PHP-FPM version you are using. For example, for Apache, you can edit the httpd.conf file and set the LogLevel directive to a value like warn or error to reduce the amount of logging output.

  3. Restart PHP-FPM and the web server to apply the changes to the configuration files.

Alternatively, you can also redirect the logs to a different location or file by modifying the log path in the configuration file. This can help to keep the logs separate from the main Symfony logs and allow for easier management and debugging.

To troubleshoot the error message that is being logged every second, you can try to identify the source of the error by checking the log files for any relevant messages. You can also enable more verbose logging in the web server and PHP-FPM configuration files to get more detailed information about the error. If you are still unable to identify the cause of the error, you may need to consult the Symfony documentation or seek help from the Symfony community to resolve the issue.


Most Popular

Remove Unicode Zero Width Space PHP

PhpStorm, return value is expected to be 'A', 'object' returned

Laravel file upload returns forbidden 403, file permission is 700 not 755