database: MDL-18269 query logging behaviour changed in Moodle 1.9 due to internal ADODB changes.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user