php log_driver: Pass all logs to php's configured error_log #6138
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As a sysadmin, it's super annoying to find that application X's php errors are not going to their expected location. In my case, that would be what I configured in php.ini or .htaccess.
With this, users are not forced into choosing an additional error_log file. They can choose 'php' for log_driver and let php's configured error_log function as they'd expect.
As an added bonus it also allows the error_log override in .htaccess to take effect (if configured) and route ALL log messages to the expected file (roundcube internal and php).
If you want to go overboard with overrides, you could also add a 'sapi' value with:
return error_log($line, 4);