Skip to content

Commit

Permalink
Add logging of DNS resolutions
Browse files Browse the repository at this point in the history
  • Loading branch information
coleaeason committed Jan 24, 2018
1 parent 8d30ccf commit c53e490
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libstuff/libstuff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c53e490

Please sign in to comment.