summaryrefslogtreecommitdiffstats
path: root/web/lib/config.inc.proto
diff options
context:
space:
mode:
authorelij <elij.mx@gmail.com>2011-04-26 20:52:11 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2011-04-27 14:50:44 +0200
commitc43558ba60ed027227010a9b93e37ee8b78be430 (patch)
tree12f29b4a4376c6f9713d7156b9446e2ea87d204a /web/lib/config.inc.proto
parent10ea5f5ff63ee7626ba4ad5dfdf3a711c31249e3 (diff)
downloadaur-c43558ba60ed027227010a9b93e37ee8b78be430.tar.gz
aur-c43558ba60ed027227010a9b93e37ee8b78be430.tar.xz
add SQL_DEBUG variable and database logging
add a hook to db_query to log all sql queries when SQL_DEBUG is set Additionally, provide better logging for sql error situations (provide backtrace as well as error message). Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/config.inc.proto')
-rw-r--r--web/lib/config.inc.proto4
1 files changed, 4 insertions, 0 deletions
diff --git a/web/lib/config.inc.proto b/web/lib/config.inc.proto
index 80a7e540..43c64d22 100644
--- a/web/lib/config.inc.proto
+++ b/web/lib/config.inc.proto
@@ -20,6 +20,10 @@ define( "PASSWD_MAX_LEN", 128 );
# Default language for displayed messages in the web interface.
define("DEFAULT_LANG", "en");
+# Enable debug sql output. This sends each query to error_log. Useful for
+# development. Should not be enabled in production. Default to 0 (off).
+define("SQL_DEBUG", 0);
+
# Languages we have translations for
$SUPPORTED_LANGS = array(
"ca" => "CatalĂ ",