Other: Add more user-level logs

This commit is contained in:
James Houlahan
2022-11-18 12:42:41 +01:00
parent 65cc1d5ccf
commit e60bbaa60f
4 changed files with 66 additions and 14 deletions

View File

@ -515,6 +515,12 @@ func (bridge *Bridge) newVaultUser(
// logout logs out the given user, optionally logging them out from the API too.
func (bridge *Bridge) logoutUser(ctx context.Context, user *user.User, withAPI, withData bool) {
logrus.WithFields(logrus.Fields{
"userID": user.ID(),
"withAPI": withAPI,
"withData": withData,
}).Debug("Logging out user")
if err := bridge.removeIMAPUser(ctx, user, withData); err != nil {
logrus.WithError(err).Error("Failed to remove IMAP user")
}