class RealisticDummyContentDrushLog in Realistic Dummy Content 8.2
Same name and namespace in other branches
- 7.2 api/src/includes/RealisticDummyContentDrushLog.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentDrushLog
- 3.x api/src/includes/RealisticDummyContentDrushLog.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentDrushLog
The Drush log, allows function to log messages to Drush.
Hierarchy
- class \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentDrushLog implements RealisticDummyContentLogInterface
Expanded class hierarchy of RealisticDummyContentDrushLog
1 file declares its use of RealisticDummyContentDrushLog
- realistic_dummy_content_api.drush.inc in api/
realistic_dummy_content_api.drush.inc - Drush integration for the realistic_dummy_content_api module.
File
- api/
src/ includes/ RealisticDummyContentDrushLog.php, line 8
Namespace
Drupal\realistic_dummy_content_api\includesView source
class RealisticDummyContentDrushLog implements RealisticDummyContentLogInterface {
/**
* {@inheritdoc}
*/
public function log($text, $vars = array()) {
drush_log(dt($text, $vars), 'ok');
}
/**
* {@inheritdoc}
*/
public function error($text, $vars = array()) {
$this
->log('RealisticDummyContent_FAILURE');
drush_set_error('RealisticDummyContent_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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RealisticDummyContentDrushLog:: |
public | function |
Add a log entry for an error. Overrides RealisticDummyContentLogInterface:: |
|
RealisticDummyContentDrushLog:: |
public | function |
Add a log entry for normal execution. Overrides RealisticDummyContentLogInterface:: |