title: How to suppress mongod heartbeat output in irb
body: <p>I'm trying to cope with the thinly documented new 2.0 rewritten Ruby driver for Mongodb.</p>
  
  <p>I want to work interactively, but the "heartbeat" monitor, which fires every 10 seconds, seems to ignore my attempts to set it to a longer period:</p>
  
  <pre><code>irb(main):004:0&gt; client = Mongo::Client.new([ '127.0.0.1:27017' ], :database =&gt; 'dbname', :heartbeat_frequency =&gt; 600)
  </code></pre>
  
  <p>But precisely ten seconds later, the flood begins:</p>
  
  <pre><code>D, [2015-04-26T05:22:20.553320 #4123] DEBUG -- : MONGODB | COMMAND | namespace=admin.$cmd selector={:ismaster=&gt;1} flags=[] limit=-1 skip=0 project=nil | runtime: 2.9023ms
  =&gt; #&lt;Mongo::Client:0x10048740 cluster=127.0.0.1:27017&gt;
  irb(main):005:0&gt; D, [2015-04-26T05:22:30.555284 #4123] DEBUG -- : MONGODB | COMMAND | namespace=admin.$cmd selector={:ismaster=&gt;1} flags=[] limit=-1 skip=0 project=nil | runtime: 0.8411ms
  </code></pre>
  
  <p>Is there any way to stop it; it ruins the screen and makes it impossible to interact with the backend.</p>