class LdapDetailLog in Lightweight Directory Access Protocol (LDAP) 8.4
Same name and namespace in other branches
- 8.3 ldap_servers/src/Logger/LdapDetailLog.php \Drupal\ldap_servers\Logger\LdapDetailLog
The detailed logger for the LDAP modules.
This logger is only active when the ldap_servers setting watchdog_detail is active. It passes messages to the regular logger with priority debug.
Hierarchy
- class \Drupal\ldap_servers\Logger\LdapDetailLog
Expanded class hierarchy of LdapDetailLog
5 files declare their use of LdapDetailLog
- DrupalUserProcessor.php in ldap_user/
src/ Processor/ DrupalUserProcessor.php - GroupUserUpdateProcessor.php in ldap_user/
src/ Processor/ GroupUserUpdateProcessor.php - LdapEntryProvisionSubscriber.php in ldap_user/
src/ EventSubscriber/ LdapEntryProvisionSubscriber.php - LoginValidatorBase.php in ldap_authentication/
src/ Controller/ LoginValidatorBase.php - TokenProcessor.php in ldap_servers/
src/ Processor/ TokenProcessor.php
1 string reference to 'LdapDetailLog'
- ldap_servers.services.yml in ldap_servers/
ldap_servers.services.yml - ldap_servers/ldap_servers.services.yml
1 service uses LdapDetailLog
File
- ldap_servers/
src/ Logger/ LdapDetailLog.php, line 16
Namespace
Drupal\ldap_servers\LoggerView source
class LdapDetailLog {
/**
* Logger.
*
* @var \Drupal\Core\Logger\LoggerChannelFactoryInterface
*/
protected $loggerFactory;
/**
* Config.
*
* @var \Drupal\Core\Config\ImmutableConfig
*/
protected $config;
/**
* LdapDetailLog constructor.
*
* @param \Drupal\Core\Logger\LoggerChannelFactoryInterface $factory
* Logger factory.
* @param \Drupal\Core\Config\ConfigFactoryInterface $config
* Config factory.
*/
public function __construct(LoggerChannelFactoryInterface $factory, ConfigFactoryInterface $config) {
$this->loggerFactory = $factory;
$this->config = $config
->get('ldap_servers.settings');
}
/**
* If detailed logging is enabled, log to Drupal log more details.
*
* @param string $message
* Log message.
* @param array $context
* Values to replace in log.
* @param string $module
* Logging channel to use.
*/
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);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LdapDetailLog:: |
protected | property | Config. | |
LdapDetailLog:: |
protected | property | Logger. | |
LdapDetailLog:: |
public | function | If detailed logging is enabled, log to Drupal log more details. | |
LdapDetailLog:: |
public | function | LdapDetailLog constructor. |