![]() |
Unable to log failed MySQL queries - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Unable to log failed MySQL queries (/showthread.php?tid=79517) |
Unable to log failed MySQL queries - eddyignite - 06-28-2021 I'm trying to log all MySQL queries using the DBQuery event. My setup: PHP Code: Events::on('DBQuery', '\App\Libraries\Logger::logQuery'); My log function: PHP Code: public static function logQuery(\CodeIgniter\Database\Query $query) CRITICAL - 2021-06-28 12:41:43 --> Table 'users.email' doesn't exist #0 /Users/eddy/Sites/rsi-now/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php(329): mysqli->query('SELECT * FROM `...') Is the documentation wrong? Or if not, how would I be able to log failed queries in their entirety? |