Log Exceptions to database

Hi all,

I have my web application running on AWS behind a load balancer. This means that I cannot depend on the log file created in "runtime/application.log" being there all the time, as the server instances may be stopped/started at any time based on traffic. I would like to ensure that any exceptions I manually throw in the application (which indicate major issues) are recorded in my database. This is easy enough to set up by creating a database entry wherever I throw an exception, however I was wondering if Yii provides a better way of doing this kind of thing?

Any help would be greatly appreciated!

there is CDbLogRoute class to do this:


Great, just what I was looking for. Thanks!