In order for my PHP program to send emails in the background, I have used rabbitmq with phpmailer. The email is working great most of the time. But I cannot figure out how to send the error message to a log file.
In normal PHP code, I'm using the error_log function and I will view the error log in folder /var/log/nginx/error.log
But here, I don't know where the log message goes. Helps is much appreciated.