You are here

public function DrushLogMigrateMessage::display in Migrate Manifest 8

Same name and namespace in other branches
  1. 8.2 src/DrushLogMigrateMessage.php \Drupal\migrate_manifest\DrushLogMigrateMessage::display()
  2. 3.x src/DrushLogMigrateMessage.php \Drupal\migrate_manifest\DrushLogMigrateMessage::display()

@inheritdoc

Overrides MigrateMessageInterface::display

File

src/DrushLogMigrateMessage.php, line 31

Class

DrushLogMigrateMessage
Simple Migrate Message implementation that uses drush to output.

Namespace

Drupal\migrate_manifest

Code

public function display($message, $type = 'status') {
  if (method_exists($this->logger, $type)) {
    $this->logger
      ->{$type}($message);
  }
  elseif ($type == 'status') {
    $this->logger
      ->info($message);
  }
  else {
    $this->logger
      ->warning('Logger called with unknown type: @type', [
      '@type' => $type,
    ]);
    $this->logger
      ->info($message);
  }
}