Request #78656 Parse errors classified as highest log-level #4805
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.
Description:
Parse errors are classified as the highest log level (LOG_EMERG). This is problem since Centos/Fedora writes LOG_EMERG messages to all users:
https://src.fedoraproject.org/rpms/rsyslog/blob/master/f/rsyslog.conf#_59
LOG_EMERG is described as: "system is unusable". A php-script with a parse error would not in most cases render the system unstable. At most LOG_ERR or LOG_CRIT would be more suitable. Fatal errors are classified as LOG_ERR. Why not make parse errors the same level?
The source:
https://github.com/php/php-src/blob/PHP-7.3/main/main.c#L1300
The commit that changed this:
3edf7d9
Bug url:
https://bugs.php.net/bug.php?id=78656