You are here

public function LdapDetailLog::log in Lightweight Directory Access Protocol (LDAP) 8.4

Same name and namespace in other branches
  1. 8.3 ldap_servers/src/Logger/LdapDetailLog.php \Drupal\ldap_servers\Logger\LdapDetailLog::log()

If detailed logging is enabled, log to Drupal log more details.

Parameters

string $message: Log message.

array $context: Values to replace in log.

string $module: Logging channel to use.

File

ldap_servers/src/Logger/LdapDetailLog.php, line 55

Class

LdapDetailLog
The detailed logger for the LDAP modules.

Namespace

Drupal\ldap_servers\Logger

Code

public function log(string $message, array $context = [], string $module = 'ldap_servers') : void {
  if ($this->config
    ->get('watchdog_detail')) {
    $this->loggerFactory
      ->get($module)
      ->debug($message, $context);
  }
}