switch IPProtocol {
case "ip4":
if ip.IP.To4() != nil {
- level.Info(logger).Log("msg", "Resolved target address", "ip", ip)
+ level.Info(logger).Log("msg", "Resolved target address", "ip", ip.String())
probeIPProtocolGauge.Set(4)
return &ip, lookupTime, nil
}
fallback = &ip
case "ip6":
-
if ip.IP.To4() == nil {
- level.Info(logger).Log("msg", "Resolved target address", "ip", ip)
+ level.Info(logger).Log("msg", "Resolved target address", "ip", ip.String())
probeIPProtocolGauge.Set(6)
return &ip, lookupTime, nil
}
} else {
probeIPProtocolGauge.Set(6)
}
+ level.Info(logger).Log("msg", "Resolved target address", "ip", fallback.String())
return fallback, lookupTime, nil
}