summaryrefslogtreecommitdiff
path: root/includes/bootstrap.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r--includes/bootstrap.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index bc13133ca..803212c14 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -1276,6 +1276,8 @@ function request_uri() {
*
* @see watchdog_severity_levels()
* @see hook_watchdog()
+ * @see DatabaseConnection::rollback()
+ * @see DatabaseTransaction::rollback()
*/
function watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL) {
global $user, $base_root;
@@ -1602,6 +1604,10 @@ function _drupal_bootstrap_database() {
// Initialize the database system. Note that the connection
// won't be initialized until it is actually requested.
require_once DRUPAL_ROOT . '/includes/database/database.inc';
+
+ // Set Drupal's watchdog as the logging callback.
+ Database::setLoggingCallback('watchdog', WATCHDOG_NOTICE, WATCHDOG_ERROR);
+
// Register autoload functions so that we can access classes and interfaces.
spl_autoload_register('drupal_autoload_class');
spl_autoload_register('drupal_autoload_interface');