How to log MySQL errors to the error file? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: How to log MySQL errors to the error file? (/showthread.php?tid=32716) |
How to log MySQL errors to the error file? - El Forum - 08-02-2010 [eluser]MatteMatte[/eluser] Hi Guys, I have a website powered by CI. In CI, three connections are being made to three different databases at the same time. I wonder how can I log MySQL errors occurring to the log file from all those 3 database connections? Following config parameters are already set and enabled: Code: $config['log_threshold'] = 1; How to log MySQL errors to the error file? - El Forum - 08-02-2010 [eluser]WanWizard[/eluser] Modify the display_error() method of DB_driver to write the error to the logfile? Or alter the error_db.php error file to write a log entry if you don't feel like modifing core classes. How to log MySQL errors to the error file? - El Forum - 08-02-2010 [eluser]MatteMatte[/eluser] [quote author="WanWizard" date="1280762234"]Modify the display_error() method of DB_driver to write the error to the logfile? Or alter the error_db.php error file to write a log entry if you don't feel like modifing core classes.[/quote] Thanks for your reply WanWizard. In db connection config, "$db['default']['db_debug']" is set to false. Will display_error() of DB_driver be triggered once $db['default']['db_debug'] is set to false? Thanks! |