class RealisticDummyContentDrushLog in Realistic Dummy Content 3.x
Same name and namespace in other branches
- 8.2 api/src/includes/RealisticDummyContentDrushLog.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentDrushLog
- 7.2 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
2 files declare their use of RealisticDummyContentDrushLog
- RealisticDummyContentDrushCommands.php in api/
src/ DrushCommands/ RealisticDummyContentDrushCommands.php - realistic_dummy_content_api.drush.inc in api/
realistic_dummy_content_api.drush.inc - Drush < 9 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 = []) {
// @phpstan-ignore-next-line
\Drupal::logger("realistic_dummy_content_api")
->notice(dt($text, $vars));
}
/**
* {@inheritdoc}
*/
public function error($text, $vars = []) {
$this
->log('RealisticDummyContent_FAILURE');
throw new \Exception('RealisticDummyContent_ERROR ' . dt($text, $vars));
}
}
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:: |