blob: bcf73ad537f8bce550f74af194b0d457cc6a745a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<?php
namespace Drupal\migrate;
use Drupal\Core\Logger\RfcLogLevel;
/**
* Defines a migrate message class.
*/
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 = $this->map[$type] ?? RfcLogLevel::NOTICE;
\Drupal::logger('migrate')->log($type, $message);
}
}
|