Files
----/后端源码/yifan.action-ai.cn/api/app/utils/banner.py

13 lines
379 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8 -*-
from app.config.path_conf import BANNER_FILE
from app.core.logger import log
def worship(env: str) -> None:
"""
获取项目启动Banner优先读取 banner.txt
"""
if BANNER_FILE.exists():
banner = BANNER_FILE.read_text(encoding='utf-8')
banner = f"🚀 当前运行环境: {env}\n{banner}"
log.info(banner)