Write to watchdog in Drupal 8

Submitted by barnettech on Tue, 03/12/2019 - 18:35


\Drupal::logger('my_module')->error($message);

\Drupal::logger('my_module')->notice($message);

\Drupal::logger('content_entity_example')->notice('@type: deleted %title.',
array(
'@type' => $this->entity->bundle(),
'%title' => $this->entity->label(),
));