You are here

class DrushLog in Realistic Dummy Content 8

Hierarchy

  • class \Drupal\realistic_dummy_content_api\loggers\DrushLog implements Log

Expanded class hierarchy of DrushLog

1 file declares its use of DrushLog
Drush.php in api/src/environments/Drush.php
Define autoload class.

File

api/src/loggers/DrushLog.php, line 13
Define autoload class.

Namespace

Drupal\realistic_dummy_content_api\loggers
View source
class DrushLog implements Log {
  public function log($text, $vars = array()) {
    drush_log(dt($text, $vars), 'ok');
  }
  public function error($text, $vars = array()) {
    $this
      ->log('_FAILURE');
    drush_set_error('_ERROR', dt($text, $vars));
    drush_set_context('DRUSH_ERROR_CODE', 1);

    // we need this for jenkins to get 1 to show up in $? With drush_die(1)
    // $? returns 0 in the command line.
    die(1);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DrushLog::error public function Overrides Log::error
DrushLog::log public function Overrides Log::log