Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-02-19 20:00:48 +0300
committerCarl Schwan <carl@carlschwan.eu>2022-02-19 20:08:15 +0300
commitce918a2091b0da733ab551660b906aa80f611914 (patch)
tree18b956a45df19da212bdc379f98c94e64bdcd410
parent5a352e3cf9451d6c02171be5e0cb5a2f7579a730 (diff)
Fix loggingpatches-ldap
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
-rw-r--r--apps/user_ldap/lib/Group_LDAP.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php
index e96123546ff..649055d0cac 100644
--- a/apps/user_ldap/lib/Group_LDAP.php
+++ b/apps/user_ldap/lib/Group_LDAP.php
@@ -358,7 +358,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
$groups = $this->walkNestedGroupsReturnDNs($dn, $fetcher, $groups);
$filterValidGroup = $this->filterValidGroups($groups);
- \OC::$server->getLogger()->critical('_getGroupDNsFromMemberOf::' . $dn . ' filterValidGroup=' . var_export($filterValidGroup, true));
+ \OC::$server->getLogger()->critical('LDAPCACHE: _getGroupDNsFromMemberOf::' . $dn . ' filterValidGroup=' . var_export($filterValidGroup, true));
return $filterValidGroup;
}
@@ -368,7 +368,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
* @param Closure(string) $fetcher
*/
private function processListFromWalkingNestedGroups(array &$list, array &$seen, string $dn, Closure $fetcher): void {
- \OC::$server->getLogger()->critical('processListFromWalkingNestedGroups::' . $dn . ' list=' . var_export($list, true) . ' seen=' . $seen);
+ \OC::$server->getLogger()->critical('LDAPCACHE: processListFromWalkingNestedGroups::' . $dn . ' list=' . var_export($list, true) . ' seen=' . var_export($seen, true));
while ($record = array_shift($list)) {
$recordDN = $record['dn'][0] ?? $record;
if ($recordDN === $dn || array_key_exists($recordDN, $seen)) {
@@ -387,7 +387,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
$seen[$recordDN] = $record;
}
}
- \OC::$server->getLogger()->critical('after processListFromWalkingNestedGroups::' . $dn . ' list=' . var_export($list, true) . ' seen=' . $seen);
+ \OC::$server->getLogger()->critical('LDAPCACHE: after processListFromWalkingNestedGroups::' . $dn . ' list=' . var_export($list, true) . ' seen=' . var_export($seen, true));
}
/**
@@ -398,7 +398,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
private function walkNestedGroupsReturnDNs(string $dn, Closure $fetcher, array $list, array &$seen = []): array {
$nesting = (int)$this->access->connection->ldapNestedGroups;
- \OC::$server->getLogger()->critical('walkNestedGroupsReturnDNs::' . $dn . ', nesting=' . $nesting);
+ \OC::$server->getLogger()->critical('LDAPCACHE: walkNestedGroupsReturnDNs::' . $dn . ', nesting=' . $nesting);
if ($nesting !== 1) {
return $list;
@@ -736,13 +736,13 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
$cacheKey = 'getUserGroups' . $uid;
$userGroups = $this->access->connection->getFromCache($cacheKey);
if (!is_null($userGroups)) {
- \OC::$server->getLogger()->critical('getUserGroups::' . $uid . ' cached =' . var_export($userGroups, true));
+ \OC::$server->getLogger()->critical('LDAPCACHE: getUserGroups::' . $uid . ' cached =' . var_export($userGroups, true));
return $userGroups;
}
$userDN = $this->access->username2dn($uid);
if (!$userDN) {
$this->access->connection->writeToCache($cacheKey, []);
- \OC::$server->getLogger()->critical('getUserGroups::' . $uid . ' no dn');
+ \OC::$server->getLogger()->critical('LDAPCACHE: getUserGroups::' . $uid . ' no dn');
return [];
}
@@ -816,7 +816,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
$groups[] = $gidGroupName;
}
$this->access->connection->writeToCache($cacheKey, $groups);
- \OC::$server->getLogger()->critical('getUserGroups::' . $uid . ' hasMemberOfFilterSupport = ' . var_export($groups, true));
+ \OC::$server->getLogger()->critical('LDAPCACHE: getUserGroups::' . $uid . ' hasMemberOfFilterSupport = ' . var_export($groups, true));
return $groups;
}
@@ -871,7 +871,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
$groups = array_unique($groups, SORT_LOCALE_STRING);
$this->access->connection->writeToCache($cacheKey, $groups);
- \OC::$server->getLogger()->critical('getUserGroups::' . $uid . ' computed = ' . var_export($groups, true));
+ \OC::$server->getLogger()->critical('LDAPCACHE: getUserGroups::' . $uid . ' computed = ' . var_export($groups, true));
return $groups;
}
@@ -887,7 +887,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
return [];
}
if ($this->cachedGroupsByMember[$dn]) {
- \OC::$server->getLogger()->critical('getGroupsByMember is cached and returns ' . var_export($this->cachedGroupsByMember[$dn], true) . ' for ' . $dn);
+ \OC::$server->getLogger()->critical('LDAPCACHE: getGroupsByMember is cached and returns ' . var_export($this->cachedGroupsByMember[$dn], true) . ' for ' . $dn);
return $this->cachedGroupsByMember[$dn];
}
$allGroups = [];
@@ -920,7 +920,7 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
$visibleGroups = $this->filterValidGroups($allGroups);
$effectiveGroups = array_intersect_key($allGroups, $visibleGroups);
$this->cachedGroupsByMember[$dn] = $effectiveGroups;
- \OC::$server->getLogger()->critical('getGroupsByMember is not cached and returns ' . var_export($this->cachedGroupsByMember[$dn], true) . ' for ' . $dn);
+ \OC::$server->getLogger()->critical('LDAPCACHE: getGroupsByMember is not cached and returns ' . var_export($this->cachedGroupsByMember[$dn], true) . ' for ' . $dn);
return $effectiveGroups;
}