Normalize logs (#837)

This commit is contained in:
Nate Brown
2023-03-30 15:07:31 -05:00
committed by GitHub
parent 6b3d42efa5
commit 1a6c657451
6 changed files with 91 additions and 53 deletions

View File

@@ -362,14 +362,14 @@ func (f *Interface) sendNoMetrics(t header.MessageType, st header.MessageSubType
for _, relayIP := range hostinfo.relayState.CopyRelayIps() {
relayHostInfo, err := f.hostMap.QueryVpnIp(relayIP)
if err != nil {
hostinfo.logger(f.l).WithField("relayIp", relayIP).WithError(err).Info("sendNoMetrics failed to find HostInfo")
hostinfo.logger(f.l).WithField("relay", relayIP).WithError(err).Info("sendNoMetrics failed to find HostInfo")
continue
}
relay, ok := relayHostInfo.relayState.QueryRelayForByIp(hostinfo.vpnIp)
if !ok {
hostinfo.logger(f.l).
WithField("relayIp", relayHostInfo.vpnIp).
WithField("relayTarget", hostinfo.vpnIp).
WithField("relay", relayHostInfo.vpnIp).
WithField("relayTo", hostinfo.vpnIp).
Info("sendNoMetrics relay missing object for target")
continue
}