fix: de-dupe dns resolver logging, more concise [ci skip]
This commit is contained in:
parent
c3442354e7
commit
e056d8dc44
|
@ -47,8 +47,6 @@ func EnsureIPv4(domainName string) (string, error) {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
logrus.Debugf("created DNS resolver via %s", freifunkDNS)
|
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
ips, err := resolver.LookupIPAddr(ctx, domainName)
|
ips, err := resolver.LookupIPAddr(ctx, domainName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -60,7 +58,7 @@ func EnsureIPv4(domainName string) (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ipv4 = ips[0].IP.To4().String()
|
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
|
return ipv4, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue