擅长:python、mysql、java
<p>从MongoEngine的<a href="https://docs.mongoengine.org/guide/logging-monitoring.html" rel="nofollow noreferrer">doc</a>来看,在连接MongoEngine之前注册侦听器似乎很重要</p>
<blockquote>
<p>To use pymongo.monitoring with MongoEngine, you need to make sure that
you are registering the listeners before establishing the database
connection (i.e calling connect)</p>
</blockquote>