feat: Refactor coverage management and enhance logging functionality
- Removed the `.coverage` file from the repository to streamline coverage management. - Updated `.gitignore` to exclude coverage-related files and directories, ensuring a cleaner project structure. - Introduced new scripts for checking GPU availability and detecting GUI parameter conflicts, enhancing the overall functionality of the application. - Improved logging mechanisms across various modules to support better debugging and monitoring. - Added comprehensive documentation for new features and updated existing markdown files for clarity.
This commit is contained in:
1 parent
539e580147
commit
e68f1dd3de
70 files changed
+62590
-10791
No files matched your search
@@ -0,0 +1,59 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""最终检查日志写入"""
|
||||
import douyin_logging
|
||||
douyin_logging.configure_logging()
|
||||
|
||||
import logging
|
||||
root = logging.getLogger()
|
||||
print(f"Root logger handlers: {len(root.handlers)}")
|
||||
|
||||
from douyin_fudai import fudai_analyse
|
||||
a = fudai_analyse()
|
||||
|
||||
# 测试 _log_kv
|
||||
print("Calling _log_kv...")
|
||||
a._log_kv("最终测试", "这是最终测试日志", test_field="test_value")
|
||||
print("_log_kv called")
|
||||
|
||||
import time
|
||||
time.sleep(1)
|
||||
|
||||
# 检查日志文件
|
||||
from datetime import datetime
|
||||
today = datetime.now().strftime("%Y-%m-%d")
|
||||
log_file = f"logs/unified_{today}.log"
|
||||
|
||||
import os
|
||||
if os.path.exists(log_file):
|
||||
with open(log_file, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
print(f"\nLog file total lines: {len(lines)}")
|
||||
print("Last 3 lines:")
|
||||
for line in lines[-3:]:
|
||||
print(f" {line.rstrip()}")
|
||||
|
||||
# 检查是否有"最终测试"相关的日志
|
||||
found = False
|
||||
for line in lines:
|
||||
if "最终测试" in line or "test_value" in line:
|
||||
print(f"\nFound log entry: {line.rstrip()}")
|
||||
found = True
|
||||
break
|
||||
if not found:
|
||||
print("\n[WARNING] Log entry not found in file!")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user