Unable to log failed MySQL queries |
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? |
Welcome Guest, Not a member yet? Register Sign In |