diff --git a/federationapi/routing/send.go b/federationapi/routing/send.go index 903a2f22c..f85da148c 100644 --- a/federationapi/routing/send.go +++ b/federationapi/routing/send.go @@ -218,7 +218,9 @@ func (t *txnReq) processTransaction() (*gomatrixserverlib.RespSend, *util.JSONRe } t.processEDUs(t.EDUs) - util.GetLogger(t.context).Infof("Processed %d PDUs from transaction %q", len(results), t.TransactionID) + if c := len(results); c > 0 { + util.GetLogger(t.context).Infof("Processed %d PDUs from transaction %q", c, t.TransactionID) + } return &gomatrixserverlib.RespSend{PDUs: results}, nil } @@ -315,7 +317,7 @@ func (t *txnReq) processEDUs(edus []gomatrixserverlib.EDU) { case gomatrixserverlib.MDeviceListUpdate: t.processDeviceListUpdate(e) default: - util.GetLogger(t.context).WithField("type", e.Type).Warn("unhandled edu") + util.GetLogger(t.context).WithField("type", e.Type).Debug("Unhandled EDU") } } } diff --git a/federationsender/queue/destinationqueue.go b/federationsender/queue/destinationqueue.go index dc2d40910..aedaeab1f 100644 --- a/federationsender/queue/destinationqueue.go +++ b/federationsender/queue/destinationqueue.go @@ -255,7 +255,7 @@ func (oq *destinationQueue) backgroundSend() { // The worker is idle so stop the goroutine. It'll get // restarted automatically the next time we have an event to // send. - log.Infof("Queue %q has been idle for %s, going to sleep", oq.destination, queueIdleTimeout) + log.Debugf("Queue %q has been idle for %s, going to sleep", oq.destination, queueIdleTimeout) return } @@ -263,12 +263,12 @@ func (oq *destinationQueue) backgroundSend() { // backoff duration to complete first, or until explicitly // told to retry. if backoff, duration := oq.statistics.BackoffDuration(); backoff { - log.WithField("duration", duration).Infof("Backing off %s", oq.destination) + log.WithField("duration", duration).Debugf("Backing off %s", oq.destination) oq.backingOff.Store(true) select { case <-time.After(duration): case <-oq.interruptBackoff: - log.Infof("Interrupting backoff for %q", oq.destination) + log.Debugf("Interrupting backoff for %q", oq.destination) } oq.backingOff.Store(false) } @@ -414,7 +414,7 @@ func (oq *destinationQueue) nextTransaction() (bool, error) { t.EDUs = append(t.EDUs, *edu) } - logrus.WithField("server_name", oq.destination).Infof("Sending transaction %q containing %d PDUs, %d EDUs", t.TransactionID, len(t.PDUs), len(t.EDUs)) + logrus.WithField("server_name", oq.destination).Debugf("Sending transaction %q containing %d PDUs, %d EDUs", t.TransactionID, len(t.PDUs), len(t.EDUs)) // Try to send the transaction to the destination server. // TODO: we should check for 500-ish fails vs 400-ish here, diff --git a/federationsender/queue/queue.go b/federationsender/queue/queue.go index 5651fba26..6d5403e82 100644 --- a/federationsender/queue/queue.go +++ b/federationsender/queue/queue.go @@ -136,7 +136,7 @@ func (oqs *OutgoingQueues) SendEvent( log.WithFields(log.Fields{ "destinations": destinations, "event": ev.EventID(), - }).Info("Sending event") + }).Infof("Sending event") headeredJSON, err := json.Marshal(ev) if err != nil {