You are here

class MigrateMessage in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/src/MigrateMessage.php \Drupal\migrate\MigrateMessage

Defines a migrate message class.

Hierarchy

Expanded class hierarchy of MigrateMessage

1 file declares its use of MigrateMessage
Sql.php in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php

File

core/modules/migrate/src/MigrateMessage.php, line 10

Namespace

Drupal\migrate
View source
class MigrateMessage implements MigrateMessageInterface {

  /**
   * The map between migrate status and watchdog severity.
   *
   * @var array
   */
  protected $map = [
    'status' => RfcLogLevel::INFO,
    'error' => RfcLogLevel::ERROR,
  ];

  /**
   * {@inheritdoc}
   */
  public function display($message, $type = 'status') {
    $type = isset($this->map[$type]) ? $this->map[$type] : RfcLogLevel::NOTICE;
    \Drupal::logger('migrate')
      ->log($type, $message);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MigrateMessage::$map protected property The map between migrate status and watchdog severity.
MigrateMessage::display public function Displays a migrate message. Overrides MigrateMessageInterface::display