From 4d1f1f2395d35e2a01e5d9f0dfe4c5af68fa9d80 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 9 Jan 2013 21:30:57 +0900 Subject: [PATCH] shrpx: Log IP version number when getaddrinfo failed --- src/shrpx.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shrpx.cc b/src/shrpx.cc index 2575878d..c7b1313f 100644 --- a/src/shrpx.cc +++ b/src/shrpx.cc @@ -147,7 +147,8 @@ evconnlistener* create_evlistener(ListenHandler *handler, int family) addrinfo *res, *rp; r = getaddrinfo(get_config()->host, service, &hints, &res); if(r != 0) { - LOG(INFO) << "Unable to get address for " << get_config()->host << ": " + LOG(INFO) << "Unable to get IPv" << (family == AF_INET ? "4" : "6") + << " address for " << get_config()->host << ": " << gai_strerror(r); return NULL; }