From 46f2f71c57ea8686a72f42b028b40b704ffdd30b Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Tue, 22 Sep 2015 13:02:08 +0200 Subject: [PATCH] Improve logging of membership queries refs #9950 --- .../Icinga/Authentication/UserGroup/LdapUserGroupBackend.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php b/library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php index de25a7c3c..21dea70ae 100644 --- a/library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php +++ b/library/Icinga/Authentication/UserGroup/LdapUserGroupBackend.php @@ -12,6 +12,7 @@ use Icinga\Protocol\Ldap\Expression; use Icinga\Repository\LdapRepository; use Icinga\Repository\RepositoryQuery; use Icinga\User; +use Icinga\Application\Logger; class LdapUserGroupBackend /*extends LdapRepository*/ implements UserGroupBackendInterface { @@ -563,10 +564,12 @@ class LdapUserGroupBackend /*extends LdapRepository*/ implements UserGroupBacken $groupQuery->where(new Expression($this->groupFilter)); } + Logger::debug('Fetching groups for user %s using filter %s.', $user->getUsername(), $groupQuery->__toString()); $groups = array(); foreach ($groupQuery as $row) { $groups[] = $row->{$this->groupNameAttribute}; } + Logger::debug('Fetched %d groups: %s.', count($groups), join(', ', $groups)); return $groups; }