function drush_backend_output

8.0.x drush_backend_output()
6.x drush_backend_output()
7.x drush_backend_output()
3.x drush_backend_output()
4.x drush_backend_output()
5.x drush_backend_output()
master drush_backend_output()
1 call to drush_backend_output()
drush_shutdown in ./drush.php
Shutdown function for use while Drupal is bootstrapping and to return any registered errors.


includes/, line 68
Drush backend API


function drush_backend_output() {
  $data = array();

  $data['output'] = ob_get_contents();

  $result_object = drush_backend_get_result();
  if (isset($result_object)) {
    $data['object'] = $result_object;

  $error = drush_get_error();
  $data['error_status'] = ($error) ? $error : DRUSH_SUCCESS;

  $data['log'] = drush_get_log(); // Append logging information
  // The error log is a more specific version of the log, and may be used by calling
  // scripts to check for specific errors that have occurred.
  $data['error_log'] = drush_get_error_log();

  // Return the options that were set at the end of the process.
  $data['context'] = drush_get_merged_options();
  if (!drush_get_context('DRUSH_QUIET')) {
    printf(DRUSH_BACKEND_OUTPUT_DELIMITER, json_encode($data));