From 0002a5f0169aa14c7ee2977618669b303a992cdf Mon Sep 17 00:00:00 2001 From: Ryo <36154873+RyoJerryYu@users.noreply.github.com> Date: Thu, 13 Jun 2024 05:41:19 +0800 Subject: [PATCH] feat: add log for startup --- memos_webhook/app.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/memos_webhook/app.py b/memos_webhook/app.py index 47a48b0..320ae68 100644 --- a/memos_webhook/app.py +++ b/memos_webhook/app.py @@ -25,8 +25,16 @@ @contextlib.asynccontextmanager async def lifespan(app: FastAPI): try: - logger.debug("webhook server started") + # logger.debug("webhook server started") + logger.info("memos webhook server started") cfg = get_config() + logger.info(f"listen on: {cfg.webhook_host}:{cfg.webhook_port}") + logger.info(f"memos info: {cfg.memos_host}:{cfg.memos_port}") + logger.info(f"log level: {cfg.log_level}") + if cfg.plugins: + plugin_names = [plugin.name for plugin in cfg.plugins.you_get_plugins] + logger.info(f"plugins: {plugin_names}") + logger.info(f"") with new_memos_cli(cfg) as memos_cli: executor = new_plugin_executor(cfg, memos_cli) yield