]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: quiet down some log messages
authorYehuda Sadeh <yehuda@hq.newdream.net>
Mon, 1 Aug 2011 20:25:14 +0000 (13:25 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Mon, 1 Aug 2011 20:25:37 +0000 (13:25 -0700)
src/rgw/rgw_admin.cc
src/rgw/rgw_cache.cc
src/rgw/rgw_main.cc
src/rgw/rgw_op.cc
src/rgw/rgw_os.cc
src/rgw/rgw_os_auth.cc
src/rgw/rgw_rados.cc
src/rgw/rgw_rest_s3.cc

index a7aedbf614f7f5280b65d70a3846ccfc390be00b..9dadec5979140c96ef522746aba35830843e4cd7 100644 (file)
@@ -306,7 +306,7 @@ static int create_bucket(string& bucket, string& user_id, string& display_name,
 
   ret = rgw_add_bucket(user_id, bucket);
 
-  RGW_LOG(0) << "ret=" << ret << dendl;
+  RGW_LOG(20) << "ret=" << ret << dendl;
 
   if (ret == -EEXIST)
     ret = 0;
index 00eb8fbddef4c2b7da09ef520ecb3bda76ee2393..4dde65ffe099d4b0ae729ad15d9ef8f947ae5cac 100644 (file)
@@ -9,7 +9,7 @@ int ObjectCache::get(string& name, ObjectCacheInfo& info, uint32_t mask)
 {
   map<string, ObjectCacheEntry>::iterator iter = cache_map.find(name);
   if (iter == cache_map.end()) {
-    RGW_LOG(0) << "cache get: name=" << name << " : miss" << dendl;
+    RGW_LOG(10) << "cache get: name=" << name << " : miss" << dendl;
     return -ENOENT;
   }
 
@@ -17,10 +17,10 @@ int ObjectCache::get(string& name, ObjectCacheInfo& info, uint32_t mask)
 
   ObjectCacheInfo& src = iter->second.info;
   if ((src.flags & mask) != mask) {
-    RGW_LOG(0) << "cache get: name=" << name << " : type miss (requested=" << mask << ", cached=" << src.flags << dendl;
+    RGW_LOG(10) << "cache get: name=" << name << " : type miss (requested=" << mask << ", cached=" << src.flags << dendl;
     return -ENOENT;
   }
-  RGW_LOG(0) << "cache get: name=" << name << " : hit" << dendl;
+  RGW_LOG(10) << "cache get: name=" << name << " : hit" << dendl;
 
   info = src;
 
@@ -29,7 +29,7 @@ int ObjectCache::get(string& name, ObjectCacheInfo& info, uint32_t mask)
 
 void ObjectCache::put(string& name, ObjectCacheInfo& info)
 {
-  RGW_LOG(0) << "cache put: name=" << name << dendl;
+  RGW_LOG(10) << "cache put: name=" << name << dendl;
   map<string, ObjectCacheEntry>::iterator iter = cache_map.find(name);
   if (iter == cache_map.end()) {
     ObjectCacheEntry entry;
index 21b9b9eaab97cdff42f4102b7ce3c80ddc89480e..7313d9049ee3e2a6e1a178cbb0bf0dca908018bf 100644 (file)
@@ -66,7 +66,7 @@ class RGWProcess {
 
     bool _enqueue(FCGX_Request *req) {
       process->m_fcgx_queue.push_back(req);
-      RGW_LOG(0) << "enqueued request fcgx=" << hex << req << dec << dendl;
+      RGW_LOG(20) << "enqueued request fcgx=" << hex << req << dec << dendl;
       _dump_queue();
       return true;
     }
@@ -81,7 +81,7 @@ class RGWProcess {
        return NULL;
       FCGX_Request *req = process->m_fcgx_queue.front();
       process->m_fcgx_queue.pop_front();
-      RGW_LOG(0) << "dequeued request fcgx=" << hex << req << dec << dendl;
+      RGW_LOG(20) << "dequeued request fcgx=" << hex << req << dec << dendl;
       _dump_queue();
       return req;
     }
@@ -91,12 +91,12 @@ class RGWProcess {
     void _dump_queue() {
       deque<FCGX_Request *>::iterator iter;
       if (process->m_fcgx_queue.size() == 0) {
-        RGW_LOG(0) << "RGWWQ: empty" << dendl;
+        RGW_LOG(20) << "RGWWQ: empty" << dendl;
         return;
       }
-      RGW_LOG(0) << "RGWWQ:" << dendl;
+      RGW_LOG(20) << "RGWWQ:" << dendl;
       for (iter = process->m_fcgx_queue.begin(); iter != process->m_fcgx_queue.end(); ++iter) {
-        RGW_LOG(0) << "fcgx: " << hex << *iter << dec << dendl;
+        RGW_LOG(20) << "fcgx: " << hex << *iter << dec << dendl;
       }
     }
     void _clear() {
@@ -132,7 +132,7 @@ void RGWProcess::run()
 
   for (;;) {
     FCGX_Request *fcgx = new FCGX_Request;
-    RGW_LOG(0) << "allocated request fcgx=" << hex << fcgx << dec << dendl;
+    RGW_LOG(10) << "allocated request fcgx=" << hex << fcgx << dec << dendl;
     FCGX_InitRequest(fcgx, s, 0);
     int ret = FCGX_Accept_r(fcgx);
     if (ret < 0)
index 1253c38b5906a312d09be805f153dfe6e9c4fafe..ead6b96c45bb59f6dd81e21eb893d84d202fbcab 100644 (file)
@@ -907,8 +907,8 @@ static int rebuild_policy(ACLOwner *owner, RGWAccessControlPolicy& src, RGWAcces
   dest_owner.set_id(owner->get_id());
   dest_owner.set_name(owner_info.display_name);
 
-  RGW_LOG(0) << "owner id=" << owner->get_id() << dendl;
-  RGW_LOG(0) << "dest owner id=" << dest.get_owner().get_id() << dendl;
+  RGW_LOG(20) << "owner id=" << owner->get_id() << dendl;
+  RGW_LOG(20) << "dest owner id=" << dest.get_owner().get_id() << dendl;
 
   RGWAccessControlList& src_acl = src.get_acl();
   RGWAccessControlList& acl = dest.get_acl();
@@ -1242,7 +1242,7 @@ void RGWCompleteMultipart::execute()
       goto done;
     }
     if (iter->second.compare(obj_iter->second.etag) != 0) {
-      RGW_LOG(0) << "part: " << iter->first << " etag: " << iter->second << dendl;
+      RGW_LOG(0) << "etag mismatch: part: " << iter->first << " etag: " << iter->second << dendl;
       ret = -ERR_INVALID_PART;
       goto done;
     }
@@ -1255,7 +1255,7 @@ void RGWCompleteMultipart::execute()
   buf_to_hex((unsigned char *)final_etag, sizeof(final_etag), final_etag_str);
   snprintf(&final_etag_str[CEPH_CRYPTO_MD5_DIGESTSIZE * 2],  sizeof(final_etag_str) - CEPH_CRYPTO_MD5_DIGESTSIZE * 2,
            "-%lld", (long long)parts->parts.size());
-  RGW_LOG(0) << "calculated etag: " << final_etag_str << dendl;
+  RGW_LOG(10) << "calculated etag: " << final_etag_str << dendl;
 
   etag_bl.append(final_etag_str, strlen(final_etag_str) + 1);
 
index 2c6bc798c1ddc7e4ce108ca1a84e27e9115dc54a..edecf55f70b428b813134ca52ae96ab9a2d390a5 100644 (file)
@@ -110,14 +110,14 @@ bool rgw_verify_os_token(req_state *s)
 
   string openstack_user = s->os_user;
 
-  RGW_LOG(0) << "openstack user=" << s->os_user << dendl;
+  RGW_LOG(10) << "openstack user=" << s->os_user << dendl;
 
   if (rgw_get_user_info_by_openstack(openstack_user, s->user) < 0) {
     RGW_LOG(0) << "couldn't map openstack user" << dendl;
     return false;
   }
 
-  RGW_LOG(0) << "user_id=" << s->user.user_id << dendl;
+  RGW_LOG(10) << "user_id=" << s->user.user_id << dendl;
 
   return true;
 }
index 0416a45405dd1a698156fce07ddc8f53b826953c..a382ea6f102066027c21b65058605db8b6ec3cd4 100644 (file)
@@ -61,7 +61,7 @@ int rgw_os_verify_signed_token(const char *token, RGWUserInfo& info)
 
   int len = strlen(token);
   if (len & 1) {
-    RGW_LOG(0) << "invalid token length" << dendl;
+    RGW_LOG(0) << "failed to verify token: invalid token length len=" << len << dendl;
     return -EINVAL;
   }
 
@@ -84,7 +84,7 @@ int rgw_os_verify_signed_token(const char *token, RGWUserInfo& info)
     ::decode(nonce, iter);
     ::decode(expiration, iter);
   } catch (buffer::error *err) {
-    RGW_LOG(0) << "failed to decode token" << dendl;
+    RGW_LOG(0) << "failed to decode token: caught exception" << dendl;
     return -EINVAL;
   }
   if (expiration < ceph_clock_now(g_ceph_context)) {
@@ -95,7 +95,7 @@ int rgw_os_verify_signed_token(const char *token, RGWUserInfo& info)
   if ((ret = rgw_get_user_info_by_openstack(os_user, info)) < 0)
     return ret;
 
-  RGW_LOG(0) << "os_user=" << os_user << dendl;
+  RGW_LOG(10) << "os_user=" << os_user << dendl;
 
   bufferlist tok;
   ret = build_token(os_user, info.openstack_key, nonce, expiration, tok);
@@ -110,7 +110,7 @@ int rgw_os_verify_signed_token(const char *token, RGWUserInfo& info)
   if (memcmp(tok.c_str(), bl.c_str(), tok.length()) != 0) {
     char buf[tok.length() * 2 + 1];
     buf_to_hex((const unsigned char *)tok.c_str(), tok.length(), buf);
-    RGW_LOG(0) << "tokens mismatch tok=" << buf << dendl;
+    RGW_LOG(0) << "WARNING: tokens mismatch tok=" << buf << dendl;
     return -EPERM;
   }
 
@@ -121,7 +121,7 @@ void RGW_OS_Auth_Get::execute()
 {
   int ret = -EPERM;
 
-  RGW_LOG(0) << "RGW_OS_Auth_Get::execute()" << dendl;
+  RGW_LOG(20) << "RGW_OS_Auth_Get::execute()" << dendl;
 
   const char *key = s->env->get("HTTP_X_AUTH_KEY");
   const char *user = s->env->get("HTTP_X_AUTH_USER");
index bf1eca731fc41481ec426de58242785e0a69b2b7..227d1cf1c96f89add89a1b3055de67e40b7604b9 100644 (file)
@@ -1173,7 +1173,7 @@ int RGWRados::append_async(rgw_obj& obj, size_t size, bufferlist& bl)
 
 int RGWRados::distribute(bufferlist& bl)
 {
-  RGW_LOG(0) << "sending notification oid=" << notify_oid << " bl.length()=" << bl.length() << dendl;
+  RGW_LOG(10) << "distributing notification oid=" << notify_oid << " bl.length()=" << bl.length() << dendl;
   int r = control_pool_ctx.notify(notify_oid, 0, bl);
   return r;
 }
index 4621e281353d758be1cdda9289fcfd8eddfb9269..4c284f2543c8ac3a776dc4d8efc71822fd0d441e 100644 (file)
@@ -691,7 +691,7 @@ int RGWHandler_REST_S3::authorize()
   time_t req_sec = s->header_time.sec();
   if (req_sec < now - RGW_AUTH_GRACE_MINS * 60 ||
       req_sec > now + RGW_AUTH_GRACE_MINS * 60) {
-    RGW_LOG(0) << "req_sec=" << req_sec << " now=" << now << "; now - RGW_AUTH_GRACE_MINS=" << now - RGW_AUTH_GRACE_MINS * 60 << "; now + RGW_AUTH_GRACE_MINS=" << now + RGW_AUTH_GRACE_MINS * 60 << dendl;
+    RGW_LOG(10) << "req_sec=" << req_sec << " now=" << now << "; now - RGW_AUTH_GRACE_MINS=" << now - RGW_AUTH_GRACE_MINS * 60 << "; now + RGW_AUTH_GRACE_MINS=" << now + RGW_AUTH_GRACE_MINS * 60 << dendl;
     RGW_LOG(0) << "request time skew too big now=" << utime_t(now, 0) << " req_time=" << s->header_time << dendl;
     return -ERR_REQUEST_TIME_SKEWED;
   }