Extending the CI_Log and CI_Exceptions - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Extending the CI_Log and CI_Exceptions (/showthread.php?tid=58030) |
Extending the CI_Log and CI_Exceptions - El Forum - 05-07-2013 [eluser]Unknown[/eluser] I would like to store system error log to a database by extending the existing CI_Log class. So far this is what i have done Code: class MY_Logger extends CI_Log{ and i have the following configured in autoload.php and config.php $autoload['libraries'] = array('database', 'session', 'xmlrpc', 'user_agent'); $config['log_threshold'] = 1; However when i test it, it does not store the error to database (although, it displays and writes the log properly) Can any one point out what i missed here? ps: Having changed the code so it extends CI_Exceptions does not work as well: Code: class MY_Exceptions extends CI_Exceptions{ and yes i also post this issue at stackoverflow here http://stackoverflow.com/questions/16413781/how-to-store-error-log-to-database-in-codeigniter?noredirect=1#comment23534791_16413781 |