title: How do I insert async to a log in mongodb?
body: <p>I want to use PyMongo as a logger for a Django app.</p>
  
  <p>I don't mind if some inserts in the log table are lost, so I want to send a log to mongodb in another server, and continue the execution without waiting for confirmation.</p>
  
  <p>I am reading pymongo docs, but it's not clear to me if the inserts in a collection are blocking or not.</p>
  
  <p>I'm thinking of doing this inside a django model method</p>
  
  <pre><code>from pymongo import MongoClient
  conn = MongoClient('mongoserver', 27017)
  db   = conn.main
  col  = db.log
  col.insert({"user": "Pedro", "action": "search", "Origin": "Katmandu"}, w=0)
  conn.close()
  </code></pre>
  
  <p>I don't know if I the insert is async like that and if the connection should be closed or not</p>