fix: de-dupe dns resolver logging, more concise [ci skip]

This commit is contained in:
decentral1se 2022-02-14 18:06:06 +01:00
parent c3442354e7
commit e056d8dc44
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 1 additions and 3 deletions

View File

@ -47,8 +47,6 @@ func EnsureIPv4(domainName string) (string, error) {
},
}
logrus.Debugf("created DNS resolver via %s", freifunkDNS)
ctx := context.Background()
ips, err := resolver.LookupIPAddr(ctx, domainName)
if err != nil {
@ -60,7 +58,7 @@ func EnsureIPv4(domainName string) (string, error) {
}
ipv4 = ips[0].IP.To4().String()
logrus.Debugf("discovered the following ipv4 addr: %s", ipv4)
logrus.Debugf("%s points to %s (resolver: %s)", domainName, ipv4, freifunkDNS)
return ipv4, nil
}