Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 3 |
MigrateMessage | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 3 |
display | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 3 |
<?php | |
/** | |
* @file | |
* Contains \Drupal\migrate\MigrateMessage. | |
*/ | |
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 = array( | |
'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); | |
} | |
} |