better:优化logger显示

This commit is contained in:
SengokuCola
2025-05-28 22:24:08 +08:00
parent 9bb2fe2d52
commit 6e39965c56
13 changed files with 93 additions and 75 deletions

View File

@@ -100,7 +100,7 @@ class InfoCatcher:
time_end = message_end.message_info.time
chat_id = message_start.chat_stream.stream_id
print(f"查询参数: time_start={time_start}, time_end={time_end}, chat_id={chat_id}")
# print(f"查询参数: time_start={time_start}, time_end={time_end}, chat_id={chat_id}")
messages_between_query = (
Messages.select()
@@ -109,10 +109,10 @@ class InfoCatcher:
)
result = list(messages_between_query)
print(f"查询结果数量: {len(result)}")
if result:
print(f"第一条消息时间: {result[0].time}")
print(f"最后一条消息时间: {result[-1].time}")
# print(f"查询结果数量: {len(result)}")
# if result:
# print(f"第一条消息时间: {result[0].time}")
# print(f"最后一条消息时间: {result[-1].time}")
return result
except Exception as e:
print(f"获取消息时出错: {str(e)}")