Commit d9367ef4 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

Instantiate logger

parent 4683cde4
Pipeline #7046 passed with stages
in 2 minutes and 34 seconds
...@@ -114,6 +114,8 @@ class Ldap implements \Psr\Log\LoggerAwareInterface ...@@ -114,6 +114,8 @@ class Ldap implements \Psr\Log\LoggerAwareInterface
$this->ldapBindPassword = $this->extensionConfiguration['ldapBindPassword']; $this->ldapBindPassword = $this->extensionConfiguration['ldapBindPassword'];
$this->ldapBaseDnForPasswordChanges = trim($this->extensionConfiguration['ldapBaseDnForPasswordChanges']); $this->ldapBaseDnForPasswordChanges = trim($this->extensionConfiguration['ldapBaseDnForPasswordChanges']);
$this->logger = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Log\LogManager::class)->getLogger(__CLASS__);
// Connect and bind // Connect and bind
try { try {
if ($this->createLdapConnection()) { if ($this->createLdapConnection()) {
......
...@@ -42,6 +42,7 @@ class PasswordUpdate implements \Psr\Log\LoggerAwareInterface ...@@ -42,6 +42,7 @@ class PasswordUpdate implements \Psr\Log\LoggerAwareInterface
/** @var \T3o\T3oLdap\Connectors\Ldap $ldap */ /** @var \T3o\T3oLdap\Connectors\Ldap $ldap */
$ldap = GeneralUtility::makeInstance(\T3o\T3oLdap\Connectors\Ldap::class); $ldap = GeneralUtility::makeInstance(\T3o\T3oLdap\Connectors\Ldap::class);
if ($ldap->setLdapPasswords($username, $this->getHashedPasswords($clearTextPassword))) { if ($ldap->setLdapPasswords($username, $this->getHashedPasswords($clearTextPassword))) {
$this->logger = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Log\LogManager::class)->getLogger(__CLASS__);
$this->logger->info('Password successfully updated (Mechanisms: ' . strtoupper(implode(', ', self::PASSWORD_METHODS)) . ')'); $this->logger->info('Password successfully updated (Mechanisms: ' . strtoupper(implode(', ', self::PASSWORD_METHODS)) . ')');
} }
} }
......
...@@ -115,6 +115,7 @@ class SlackImportCommandController extends CommandController implements \Psr\Log ...@@ -115,6 +115,7 @@ class SlackImportCommandController extends CommandController implements \Psr\Log
} }
} while ($cursor); } while ($cursor);
$this->logger = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Log\LogManager::class)->getLogger(__CLASS__);
$this->logger->info('Import of Slack User sucessful - imported ' . $counter . ' users'); $this->logger->info('Import of Slack User sucessful - imported ' . $counter . ' users');
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment