From 28b038390eff5492e458524dffe521046680d30f Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 30 Jul 2021 10:56:23 +0100 Subject: [PATCH] Logging --- keyserver/internal/internal.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/keyserver/internal/internal.go b/keyserver/internal/internal.go index 9ed5ca78..9d037876 100644 --- a/keyserver/internal/internal.go +++ b/keyserver/internal/internal.go @@ -284,21 +284,27 @@ func (a *KeyInternalAPI) QueryKeys(ctx context.Context, req *api.QueryKeysReques // work out if our cross-signing request for this user was // satisfied, if not add them to the list of things to fetch if _, ok := res.MasterKeys[userID]; !ok { + util.GetLogger(ctx).Infof("No cross-signing master keys for %s found", userID) if _, ok := domainToDeviceKeys[domain]; !ok { domainToDeviceKeys[domain] = make(map[string][]string) } if _, ok := domainToDeviceKeys[domain][userID]; !ok { util.GetLogger(ctx).Infof("Request cross-signing keys from %s for %s", domain, userID) domainToDeviceKeys[domain][userID] = []string{} + } else { + util.GetLogger(ctx).Infof("Already requesting keys from %s for %s", domain, userID) } } if _, ok := res.SelfSigningKeys[userID]; !ok { + util.GetLogger(ctx).Infof("No cross-signing self-signing keys for %s found", userID) if _, ok := domainToDeviceKeys[domain]; !ok { domainToDeviceKeys[domain] = make(map[string][]string) } if _, ok := domainToDeviceKeys[domain][userID]; !ok { util.GetLogger(ctx).Infof("Request cross-signing keys from %s for %s", domain, userID) domainToDeviceKeys[domain][userID] = []string{} + } else { + util.GetLogger(ctx).Infof("Already requesting keys from %s for %s", domain, userID) } } }