title: How to print in mapReduce using mongodb node package
body: <p>I am using the mongodb package for node.js. I have a <code>mapReduce</code> function, and I would like to print some debug output inside of it. How do I do this?</p>
  
  <p>I currently have the following:</p>
  
  <pre><code>var map = function() {
    print('hello');
    emit('key', 1);
  }
  
  var reduce = function(k, vals) {
    return Array.sum(vals);
  }
  
  collection.mapReduce(map, reduce, {out: {inline: 1}}, function(err, results) {...});
  </code></pre>
  
  <p>However, <code>hello</code> never gets printed to the console when I run from the command line:</p>
  
  <pre><code>$ node test.js
  </code></pre>
  
  <p>How do I see the output?</p>