]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: avoid expensive dump unless log will gather
authorSage Weil <sage@inktank.com>
Tue, 26 Feb 2013 19:33:23 +0000 (11:33 -0800)
committerSage Weil <sage@inktank.com>
Tue, 26 Feb 2013 19:33:47 +0000 (11:33 -0800)
Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/PaxosService.cc

index 8495870e9a04d7cc141827dc293a8ee153958b4d..72b00b85313ef2bee4099c48cbb79f33f29b3b03 100644 (file)
@@ -158,11 +158,13 @@ void PaxosService::propose_pending()
   encode_pending(&t);
   have_pending = false;
 
-  JSONFormatter f(true);
-  t.dump(&f);
-  dout(30) << __func__ << " transaction dump:\n";
-  f.flush(*_dout);
-  *_dout << dendl;
+  if (g_conf->subsys.should_gather(dout_subsys, 30)) {
+    JSONFormatter f(true);
+    t.dump(&f);
+    dout(30) << __func__ << " transaction dump:\n";
+    f.flush(*_dout);
+    *_dout << dendl;
+  }
   
 
   t.encode(bl);