From: Yehuda Sadeh Date: Fri, 1 Aug 2014 21:09:48 +0000 (-0700) Subject: rgw: log civetweb messages X-Git-Tag: v0.85~24^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1293e6bab536f3b1b2f4a7b4b6ab33541270e63d;p=ceph.git rgw: log civetweb messages Handle the civetweb log_message callback, divert messages into our debug log. Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index 3443a6195df..31b6b54da4b 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -699,6 +699,11 @@ static int civetweb_callback(struct mg_connection *conn) { return 1; } +static int civetweb_log_callback(const struct mg_connection *conn, const char *buf) { + dout(10) << "civetweb: " << (void *)conn << ": " << buf << dendl; + return 0; +} + #ifdef HAVE_CURL_MULTI_WAIT static void check_curl() { @@ -937,6 +942,7 @@ public: struct mg_callbacks cb; memset((void *)&cb, 0, sizeof(cb)); cb.begin_request = civetweb_callback; + cb.log_message = civetweb_log_callback; ctx = mg_start(&cb, &env, (const char **)&options); if (!ctx) {