feat: adds descriptions to feature checks and add them to logs (#4504)

This commit is contained in:
Carter
2024-11-07 23:37:53 -06:00
committed by GitHub
parent e3c6d4c66c
commit 8ce6f9038a
3 changed files with 286 additions and 46 deletions

View File

@@ -64,20 +64,23 @@ async def lifespan_fn(_: FastAPI) -> AsyncGenerator[None, None]:
settings.model_dump_json(
indent=4,
exclude={
"LDAP_QUERY_PASSWORD",
"OPENAI_API_KEY",
"SECRET",
"SESSION_SECRET",
"SFTP_PASSWORD",
"SFTP_USERNAME",
"DB_URL", # replace by DB_URL_PUBLIC for logs
"DB_PROVIDER",
"SMTP_USER",
"SMTP_PASSWORD",
"OIDC_CLIENT_SECRET",
},
)
)
logger.info("------APP FEATURES------")
logger.info("--------==SMTP==--------")
logger.info(settings.SMTP_FEATURE)
logger.info("--------==LDAP==--------")
logger.info(settings.LDAP_FEATURE)
logger.info("--------==OIDC==--------")
logger.info(settings.OIDC_FEATURE)
logger.info("-------==OPENAI==-------")
logger.info(settings.OPENAI_FEATURE)
logger.info("------------------------")
yield