]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: use a separate callback for civetweb access log 2303/head
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 21 Aug 2014 23:51:16 +0000 (16:51 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 22 Aug 2014 17:05:53 +0000 (10:05 -0700)
Access log is separate from the regular civetweb logging. Also, changed
the log level for the regular logging as it's used mostly for error
messages.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/civetweb
src/rgw/rgw_civetweb_log.cc
src/rgw/rgw_civetweb_log.h
src/rgw/rgw_main.cc

index ebf869ab50a070a3580ec4303c2aaf278bd73d24..92b43ae376fb87b284ae7acf1d459b0008e7d69e 160000 (submodule)
@@ -1 +1 @@
-Subproject commit ebf869ab50a070a3580ec4303c2aaf278bd73d24
+Subproject commit 92b43ae376fb87b284ae7acf1d459b0008e7d69e
index 720bab5f32333af272d892fff0dc482b9fba5ca1..e2d8dd9ad015d26e0af0243b96113621706b8824 100644 (file)
@@ -7,7 +7,12 @@
 
 
 int rgw_civetweb_log_callback(const struct mg_connection *conn, const char *buf) {
-  dout(10) << "civetweb: " << (void *)conn << ": " << buf << dendl;
+  dout(0) << "civetweb: " << (void *)conn << ": " << buf << dendl;
+  return 0;
+}
+
+int rgw_civetweb_log_access_callback(const struct mg_connection *conn, const char *buf) {
+  dout(1) << "civetweb: " << (void *)conn << ": " << buf << dendl;
   return 0;
 }
 
index 6c6b2c061e332edd3acb956ce39ab72e8799e2a1..0fc227a54685414223e9aca955c45d363485be7b 100644 (file)
@@ -2,5 +2,6 @@
 #define CEPH_RGW_CIVETWEB_LOG_H
 
 int rgw_civetweb_log_callback(const struct mg_connection *conn, const char *buf);
+int rgw_civetweb_log_access_callback(const struct mg_connection *conn, const char *buf);
 
 #endif
index 92da3c431c4510fc6c50834e99052c18f29bd519..f12ef200864b8ed7e72534fc06654eb6945d6473 100644 (file)
@@ -939,6 +939,7 @@ public:
     memset((void *)&cb, 0, sizeof(cb));
     cb.begin_request = civetweb_callback;
     cb.log_message = rgw_civetweb_log_callback;
+    cb.log_access = rgw_civetweb_log_access_callback;
     ctx = mg_start(&cb, &env, (const char **)&options);
 
     if (!ctx) {