feat: enhance logging detail across all modules
- email_client: log IMAP connection, login, UNSEEN count, each email details (subject/sender/body size), mark-as-seen progress - ai_client: log AI request params, timing, token usage, response size - smtp_client: log SMTP connect, login, send details - tg_bot: log all callback actions with subject context, message states - main: periodic queue depth report (email_queue/tg_queue/pending_uids)
This commit is contained in:
6
main.py
6
main.py
@@ -116,8 +116,14 @@ def main():
|
||||
for t in threads:
|
||||
t.start()
|
||||
|
||||
logger.info("所有线程已启动,进入主循环")
|
||||
tick = 0
|
||||
try:
|
||||
while _running:
|
||||
tick += 1
|
||||
if tick % 30 == 0:
|
||||
logger.info("队列状态: email_queue=%d tg_queue=%d pending_uids=%d",
|
||||
_email_queue.qsize(), _tg_queue.qsize(), len(_pending_uids))
|
||||
time.sleep(1)
|
||||
except KeyboardInterrupt:
|
||||
_running = False
|
||||
|
||||
Reference in New Issue
Block a user