database: MDL-18269 query logging behaviour changed in Moodle 1.9 due to internal ADODB changes.

This commit is contained in:
tjhunt
2009-02-16 03:00:07 +00:00
parent d5b43ea6a2
commit bb2067c851
2 changed files with 8 additions and 0 deletions
+3
View File
@@ -259,6 +259,9 @@ $CFG->admin = 'admin';
// The following setting will log every database query to a table called adodb_logsql.
// Use this setting on a development server only, the table grows quickly!
// $CFG->logsql = true;
// By default, only queries that take longer than 0.05 seconds are logged. To change that,
// set the following variable. For example, to lot all queries:
// $CFG->logsqlmintime = 0.0;
//
// The following setting will turn on username logging into Apache log. For full details regarding setting
// up of this function please refer to the install section of the document.
+5
View File
@@ -241,6 +241,11 @@ global $HTTPSPAGEREQUIRED;
/// Turn on SQL logging if required
if (!empty($CFG->logsql)) {
$db->LogSQL();
// And override ADODB's default logging time
if (isset($CFG->logsqlmintime)) {
global $ADODB_PERF_MIN;
$ADODB_PERF_MIN = $CFG->logsqlmintime;
}
}
/// Prevent warnings from roles when upgrading with debug on