Update authentication pymongo logger level
This commit is contained in:
parent
f8b60391b2
commit
1972a5758b
@ -19,6 +19,7 @@ async def initiate_database():
|
|||||||
serverSelectionTimeoutMS=60000,
|
serverSelectionTimeoutMS=60000,
|
||||||
minPoolSize=5, # Minimum number of connections in the pool
|
minPoolSize=5, # Minimum number of connections in the pool
|
||||||
maxPoolSize=20, # Maximum number of connections in the pool
|
maxPoolSize=20, # Maximum number of connections in the pool
|
||||||
|
heartbeatFrequencyMS=20000, # Adjust heartbeat frequency to 20 seconds
|
||||||
)
|
)
|
||||||
await init_beanie(
|
await init_beanie(
|
||||||
database=client[app_settings.MONGODB_NAME], document_models=backend_models
|
database=client[app_settings.MONGODB_NAME], document_models=backend_models
|
||||||
|
|||||||
@ -32,6 +32,9 @@ def register(app=None):
|
|||||||
logger.disable("pika.spec")
|
logger.disable("pika.spec")
|
||||||
logger.disable("aiormq.connection")
|
logger.disable("aiormq.connection")
|
||||||
logger.disable("urllib3.connectionpool")
|
logger.disable("urllib3.connectionpool")
|
||||||
|
logging.getLogger("pymongo").setLevel(
|
||||||
|
logging.WARNING
|
||||||
|
) # Suppress pymongo DEBUG logs
|
||||||
|
|
||||||
|
|
||||||
class InterceptHandler(logging.Handler):
|
class InterceptHandler(logging.Handler):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user