You are here

protected function Subscribers::debug in Message Subscribe 8

Wrapper to the logger channel to only log if debugging is enabled.

Parameters

string $message: The message to log.

array $context: The replacement patterns.

2 calls to Subscribers::debug()
Subscribers::getSubscribers in src/Subscribers.php
Retrieve a list of subscribers for a given entity.
Subscribers::sendMessage in src/Subscribers.php
Process a message and send to subscribed users.

File

src/Subscribers.php, line 496

Class

Subscribers
A message subscribers service.

Namespace

Drupal\message_subscribe

Code

protected function debug($message, array $context = []) {
  if (!$this->debug) {
    return;
  }
  $this->logger
    ->debug($message, $context);
}