feat(explorer-api): add debug logs

This commit is contained in:
pierre
2022-10-26 12:29:01 +02:00
parent cf10bb12ef
commit 3f4373eb98
+4 -2
View File
@@ -59,7 +59,7 @@ impl GeoIp {
pub fn query(&self, address: &str, port: Option<u16>) -> Result<Option<Location>, GeoIpError> {
let ip: IpAddr = FromStr::from_str(address).or_else(|_| {
warn!(
debug!(
"Fail to create IpAddr from {}. Trying using internal lookup...",
&address
);
@@ -75,7 +75,9 @@ impl GeoIp {
error!("Fail to resolve IP address from {}:{}", &address, p);
GeoIpError::NoValidIP
})?;
Ok(socket_addr.ip())
let ip = socket_addr.ip();
debug!("Internal lookup succeed, resolved ip: {}", ip);
Ok(ip)
})?;
let result = self
.db