Commit 250812aa authored by Sietse Ringers's avatar Sietse Ringers
Browse files

chore: more revocation logging

parent df97b2ee
......@@ -102,7 +102,7 @@ func (s *Server) StartSession(req interface{}) (*irma.Qr, string, error) {
session := s.newSession(action, rrequest)
s.conf.Logger.WithFields(logrus.Fields{"action": action, "session": session.token}).Infof("Session started")
if s.conf.Logger.IsLevelEnabled(logrus.DebugLevel) {
s.conf.Logger.WithFields(logrus.Fields{"session": session.token}).Info("Session request: ", server.ToJson(rrequest))
s.conf.Logger.WithFields(logrus.Fields{"session": session.token, "clienttoken": session.clientToken}).Info("Session request: ", server.ToJson(rrequest))
} else {
s.conf.Logger.WithFields(logrus.Fields{"session": session.token}).Info("Session request (purged of attribute values): ", server.ToJson(purgeRequest(rrequest)))
}
......
......@@ -427,6 +427,7 @@ func (rs *RevocationStorage) UpdateIfOld(typ CredentialTypeIdentifier) error {
settings := rs.getSettings(typ)
// update 10 seconds before the maximum, to stay below it
if settings.updated.Before(time.Now().Add(time.Duration(-settings.MaxNonrevocationDuration+10) * time.Second)) {
Logger.WithField("credtype", typ).Tracef("fetching revocation updates")
if err := rs.UpdateDB(typ); err != nil {
return err
}
......
......@@ -172,7 +172,7 @@ func (m memRevStorage) Latest(typ CredentialTypeIdentifier, count uint64) map[ui
}
copy(update.Events, r.Events[offset:])
if len(update.Events) > 0 {
Logger.Tracef("membdb: get %d-%d", update.Events[0].Index, update.Events[len(update.Events)-1].Index)
Logger.Tracef("memdb: get %d-%d", update.Events[0].Index, update.Events[len(update.Events)-1].Index)
}
updates[r.SignedAccumulator.PKCounter] = update
}
......@@ -214,7 +214,7 @@ func (m memRevStorage) Insert(typ CredentialTypeIdentifier, update *revocation.U
return
}
Logger.Trace("membdb: inserting")
Logger.Trace("memdb: inserting")
r.SignedAccumulator = update.SignedAccumulator
r.Events = append(r.Events, theirs[offset:]...)
}
......
Markdown is supported
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