main
HuangHai 1 week ago
parent 0686c3332c
commit 870e3540a0

@ -18,6 +18,19 @@ from Util.PostgreSQLUtil import init_postgres_pool
from Util.WxGzhUtil import init_wechat_browser, get_article_content from Util.WxGzhUtil import init_wechat_browser, get_article_content
# 在程序开始时添加以下配置
logging.basicConfig(
level=logging.INFO, # 设置日志级别为INFO
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
)
# 或者如果你想更详细地控制日志输出
logger = logging.getLogger('WeiXinGongZhongHao')
logger.setLevel(logging.INFO)
handler = logging.StreamHandler()
handler.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))
logger.addHandler(handler)
async def get_wechat_sources(): async def get_wechat_sources():
"""从t_wechat_source表获取微信公众号列表""" """从t_wechat_source表获取微信公众号列表"""
try: try:

Loading…
Cancel
Save