Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / migrate / src / MigrateMessage.php
1 <?php
2
3 namespace Drupal\migrate;
4
5 use Drupal\Core\Logger\RfcLogLevel;
6
7 /**
8  * Defines a migrate message class.
9  */
10 class MigrateMessage implements MigrateMessageInterface {
11
12   /**
13    * The map between migrate status and watchdog severity.
14    *
15    * @var array
16    */
17   protected $map = [
18     'status' => RfcLogLevel::INFO,
19     'error' => RfcLogLevel::ERROR,
20   ];
21
22   /**
23    * {@inheritdoc}
24    */
25   public function display($message, $type = 'status') {
26     $type = isset($this->map[$type]) ? $this->map[$type] : RfcLogLevel::NOTICE;
27     \Drupal::logger('migrate')->log($type, $message);
28   }
29
30 }