From c53e4907427d57d0b5e9ef6d60407c1ef9519880 Mon Sep 17 00:00:00 2001 From: Cole Eason Date: Wed, 24 Jan 2018 15:31:32 -0800 Subject: [PATCH] Add logging of DNS resolutions --- libstuff/libstuff.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libstuff/libstuff.cpp b/libstuff/libstuff.cpp index b619f72f6..0ecb30a88 100644 --- a/libstuff/libstuff.cpp +++ b/libstuff/libstuff.cpp @@ -1516,6 +1516,9 @@ int S_socket(const string& host, bool isTCP, bool isPort, bool isBlocking) { } in_addr* addr = (in_addr*)hostent->h_addr_list[0]; ip = addr->s_addr; + char plainTextIP[INET_ADDRSTRLEN]; + inet_ntop(AF_INET, addr, plainTextIP, INET_ADDRSTRLEN); + SINFO("Resolved " << domain << " to ip: " << plainTextIP << "."); } // Open a socket