Skip to content

Instantly share code, notes, and snippets.

@samukasmk
Created January 15, 2026 20:47
Show Gist options
  • Select an option

  • Save samukasmk/08d4cb82a5084174e8e9381121a4cacf to your computer and use it in GitHub Desktop.

Select an option

Save samukasmk/08d4cb82a5084174e8e9381121a4cacf to your computer and use it in GitHub Desktop.
import logging
logging.basicConfig(level=logging.INFO)
# mostra comandos enviados ao MongoDB
logging.getLogger("pymongo.command").setLevel(logging.DEBUG)
# (opcional) conexões / pool
logging.getLogger("pymongo.connection").setLevel(logging.INFO)
logging.getLogger("pymongo.serverSelection").setLevel(logging.INFO)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment