Skip to content

Commit

Permalink
Merge pull request #6 from RyoJerryYu/feat-log-info-when-startup
Browse files Browse the repository at this point in the history
feat: add log for startup
  • Loading branch information
RyoJerryYu authored Jun 12, 2024
2 parents 00818c9 + 0002a5f commit b7e0020
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion memos_webhook/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b7e0020

Please sign in to comment.