Basically the same problem as this question but the suggested fixes are not working:
PHP error log and newline chars
Error logs are being written by Apache like this:
ErrorLog "|/usr/sbin/rotatelogs /var/www/logs/error_log.%Y-%m-%d 86400"
But the PHP errors in the logs are full of \n
where there should be a new line.
I have tried setting the ownership of the logs folder and the logs file to "apache" as suggested in the other question but this doesn't help.
The server is running php-fpm. Note if I chose to use php-fpm logging php_admin_value[error_log] = /var/log/php-fpm/www-error.log
then the logs that are created are correct, but this is a general log and not suitable for the server running multiple sites.