From a1918e5a22a600e3b88a9ab3959d05770216a99b Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Mon, 24 Feb 2014 09:51:16 -0500 Subject: [PATCH] Added db query to error log --- server/lib/classes/db_mysql.inc.php | 2 +- interface/lib/classes/db_mysql.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index e0d3517..c5f5e9f 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -419,7 +419,7 @@ if($this->show_error_messages && $conf['demo_mode'] === false) { echo $sErrormsg . $sAddMsg; } else if(is_object($app) && method_exists($app, 'log')) { - $app->log($sErrormsg . $sAddMsg, LOGLEVEL_WARN); + $app->log($sErrormsg . $sAddMsg . ' -> ' . $mysql_errno . ' (' . $mysql_error . ')', LOGLEVEL_WARN); } } diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php index af846ef..e6600e9 100644 --- a/server/lib/classes/db_mysql.inc.php +++ b/server/lib/classes/db_mysql.inc.php @@ -424,7 +424,7 @@ if($this->show_error_messages && $conf['demo_mode'] === false) { echo $sErrormsg . $sAddMsg; } else if(is_object($app) && method_exists($app, 'log')) { - $app->log($sErrormsg . $sAddMsg, LOGLEVEL_WARN); + $app->log($sErrormsg . $sAddMsg . ' -> ' . $mysql_errno . ' (' . $mysql_error . ')', LOGLEVEL_WARN); } } -- Gitblit v1.9.1