You can configure error_log content to go to syslog by configuring it in either the CLI or Apache php.ini file; or on a per site basis in your Apache configuration files.
Warning, the following will likely cause your 'error_log' messages to be logged to '/var/log/syslog'.
To prevent this, edit '/etc/rsyslog.d/50-defaults.conf', and change:
*.*;auth,authpriv.none -/var/log/syslog
*.*;auth,authpriv.none;local6.none -/var/log/syslog
You may then log your error_log messages to another file by adding a new rule such as:
local6.* /var/log/local6.log
or
:syslogtag, isequal, "YOUR_IDENTIFIER:" /var/log/YOUR_IDENTIFIER.log
PHP site wide
For example, to configure all websites to log to syslog, edit the following file:
/etc/php/7.4/apache2/php.ini
Search for, then edit the following values that will be commented out by default:
error_log = syslog
syslog.ident = YOUR_IDENTIFIER
syslog.facility = local6
The above will cause error_log() calls to be logged to "YOUR_IDENTIFIER.log".
Alternatively, for PHP command line programs you can edit:
/etc/php/7.4/php/php.ini
Apache website specific logging
However, when using Apache, you probably want to log to separate files.
In that case, you only need to update your site specific Apache config file.
Add an appropriate Directory section, and then use the 'php_value' and 'php_admin_value' directives to set these values.
For example:
<VirtualHost *:80>
...
<Directory /path/to/website/>
php_value error_log syslog
php_admin_value syslog.ident YOUR_IDENTIFIER
php_admin_value syslog.facility local6
</Directory>
...
</VirtualHost>
Alternatively, you can use the 'PHPINIDir' directive to make the website use a completely different 'php.ini' file.
For example:
<VirtualHost *.80>
...
PHPINIDir /etc/apache/my_website
...
</VirtualHost>
Where the 'my_website' directory contains a copy of 'php.ini' that has been appropriately edited.
References
Log Files - Apache HTTP Server Version 2.4
How to change configuration settings (PHP Manual)
List of php.ini directives (PHP Manaul)
How to specify a customer php.ini for a website