Help With Errors

Ok so I have a production system running and when a non-fatal/minor error occurs it just redirects the users to a screen that says "internal server error’ and does not log anything to the web servers error log.

I have the errors logging to the {application}/runtime/app.log but I want to know where I would put some code to pop a copy of this in the servers error log. I use New Relic and want to see these come through. How would you do this and where would I pop the code to do this?

Any help is appreciated


I turned off the Yii Error Handler by setting YII_ENABLE_ERROR_HANDLER to false, and it is logging to the systems error log which is where I want to log it, But this is NOT what I want because now the 404’s and 401’s and 500 pages don’t display.

Any ideas?