Problem with custom php-fpm.log
HapiCZ opened this issue · 1 comments
Describe the bug
If I set a custom log name in the php-fpm.conf file, two logs are created after FPM restarts. For example, if I name the file as php8.1-fpm.log, after restarting the service, the original php-fpm.log and php8.1-fpm.log will be created at the same time. The problem lies in the configuration files *.plist and *.service, where php-fpm.log is set. So I have to update these files as well. However, there is a risk that they will be overwritten again during the upgrade.
PHP versions
All
To Reproduce
- Stop PHP service.
- Delete old logs in var/log directory.
- Rename php-fpm.log in php-fpm.conf.
- Start PHP service5.
- There are now two log files in the log directory.
Expected behavior
There should only be one log in the log directory
Additional context
If I have several versions of PHP installed, they all share the same logo. Which can be a problem for logrotate. It would be better if each PHP instance had its own log. But now it's not easy to set up.
Two solutions are possible:
- Set a custom name for each php version in Formulas. Eg: php8.1-php.log
- Remove the log setting in *.plist and *.service and leave it to the user.
Are you willing to submit a PR?
Maybe. I have no experience with it.