Cemaillogroute Dynamic Subject
Posted 17 May 2013 - 03:08 AM
I am trying to find out how to add some dynamic content to the subject of the email sent by CEmailLogRoute.
For instance, if the Log is generated by a "CHttpException 404" I would like to add that error code to the email's subject.
I've though about extending CEmailLogRoute's processLogs, but I am not sure where from extract the error/exception data.
Any help is appreciated
Posted 22 May 2013 - 04:56 AM
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.
Thanks in advance.
Posted 22 May 2013 - 09:56 AM
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.