function _drush_log_update_sql

8.0.x drupal.inc _drush_log_update_sql($ret)
6.x drupal.inc _drush_log_update_sql($ret)
7.x drupal.inc _drush_log_update_sql($ret)
3.x drush.inc _drush_log_update_sql($ret)
4.x drush.inc _drush_log_update_sql($ret)
5.x drupal.inc _drush_log_update_sql($ret)
master drupal.inc _drush_log_update_sql($ret)

Log the return value of Drupal hook_update_n functions.

This is used during install and update to log the output of the update process to the logging system.

2 calls to _drush_log_update_sql()
update_main_prepare in commands/core/drupal/update_6.inc
_update_do_one in commands/core/drupal/update_6.inc
A simplified version of the batch_do_one function from update.php

File

includes/drupal.inc, line 107

Code

function _drush_log_update_sql($ret) {
  if (sizeof($ret)) {
    foreach ($ret as $info) {
      if (is_array($info)) {
        if (!$info['success']) {
          drush_set_error('DRUPAL_UPDATE_FAILED', $info['query']);
        }
        else {
          drush_log($info['query'], ($info['success']) ? 'success' : 'error');
        }
      }
    }
  }
}