]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: write debug acl output to the debug output (not cout)
authorSage Weil <sage@newdream.net>
Tue, 4 Oct 2011 23:05:34 +0000 (16:05 -0700)
committerSage Weil <sage@newdream.net>
Tue, 4 Oct 2011 23:05:34 +0000 (16:05 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
src/rgw/rgw_common.cc
src/rgw/rgw_op.cc

index 00713d7e9d9f924759eff9da8ccd946310039d5d..23a2e7de0f36331168a52ad52e9584f0d6b4768e 100644 (file)
@@ -129,14 +129,14 @@ int gen_rand_base64(char *dest, int size) /* size should be the required string
 
   ret = get_random_bytes(buf, sizeof(buf));
   if (ret < 0) {
-    cerr << "cannot get random bytes: " << cpp_strerror(-ret) << std::endl;
+    derr << "cannot get random bytes: " << cpp_strerror(-ret) << dendl;
     return -1;
   }
 
   ret = ceph_armor(tmp_dest, &tmp_dest[sizeof(tmp_dest)],
                   (const char *)buf, ((const char *)buf) + ((size - 1) * 3 + 4 - 1) / 4);
   if (ret < 0) {
-    cerr << "ceph_armor failed" << std::endl;
+    derr << "ceph_armor failed" << dendl;
     return -1;
   }
   tmp_dest[ret] = '\0';
@@ -152,7 +152,7 @@ int gen_rand_alphanumeric_upper(char *dest, int size) /* size should be the requ
 {
   int ret = get_random_bytes(dest, size);
   if (ret < 0) {
-    cerr << "cannot get random bytes: " << cpp_strerror(-ret) << std::endl;
+    derr << "cannot get random bytes: " << cpp_strerror(-ret) << dendl;
     return -1;
   }
 
@@ -174,7 +174,7 @@ int gen_rand_alphanumeric(char *dest, int size) /* size should be the required s
 {
   int ret = get_random_bytes(dest, size);
   if (ret < 0) {
-    cerr << "cannot get random bytes: " << cpp_strerror(-ret) << std::endl;
+    derr << "cannot get random bytes: " << cpp_strerror(-ret) << dendl;
     return -1;
   }
 
index 23bea4ff6b018a12536e0b077048f4e7939a1f07..2583930baefbeef105eaf2edc75cef8ed5c8157b 100644 (file)
@@ -154,9 +154,9 @@ static int get_policy_from_attr(void *ctx, RGWAccessControlPolicy *policy, rgw_o
         return -EIO;
       }
       if (g_conf->debug_rgw >= 15) {
-        dout(15) << "Read AccessControlPolicy" << dendl;
-        policy->to_xml(cerr);
-        dout(15) << dendl;
+        dout(15) << "Read AccessControlPolicy";
+        policy->to_xml(*_dout);
+        *_dout << dendl;
       }
     }
   }
@@ -1100,9 +1100,9 @@ void RGWPutACLs::execute()
   }
 
   if (g_conf->debug_rgw >= 15) {
-    dout(15) << "Old AccessControlPolicy" << dendl;
-    policy->to_xml(cout);
-    dout(15) << dendl;
+    dout(15) << "Old AccessControlPolicy";
+    policy->to_xml(*_dout);
+    *_dout << dendl;
   }
 
   ret = rebuild_policy(&owner, *policy, new_policy);
@@ -1110,9 +1110,9 @@ void RGWPutACLs::execute()
     goto done;
 
   if (g_conf->debug_rgw >= 15) {
-    dout(15) << "New AccessControlPolicy" << dendl;
-    new_policy.to_xml(cout);
-    dout(15) << dendl;
+    dout(15) << "New AccessControlPolicy:";
+    new_policy.to_xml(*_dout);
+    *_dout << dendl;
   }
 
   new_policy.encode(bl);