As an alternative I was trying to check at SiteController actionError, if the URL that generated the error was in an specific array (created by me). In case it was true I’d redirect the user. The idea of redirect is to avoid the 404 error.
That works fine for the user. But I still receive annoying Emails with 404 error. I suppose that the error is logged to the email before entering SiteContrroller actionError. How exactly may I filter it ? Extending CEmailLogRoute or setting a filter and extending CLogFilter ?
Still I wonder how to add the error code to the subject.
I’ve had a look, but the only option I can see is to scan through the logs for a category of “exception.CHttpException.404” or filter on the same using the CLogger::getLogs() method.
EDIT:
It occurs to me that if you only want to avoid being notified of 404’s, you could use the except property to exclude the category above.