Change Report Engine Log Output Level
This commit is contained in:
@@ -237,9 +237,10 @@ class ReportAgent:
|
||||
# 确保日志目录存在
|
||||
log_dir = os.path.dirname(self.config.LOG_FILE)
|
||||
os.makedirs(log_dir, exist_ok=True)
|
||||
|
||||
|
||||
# 创建专用的logger,避免与其他模块冲突
|
||||
logger.add(self.config.LOG_FILE, level="INFO")
|
||||
# 修改日志级别为DEBUG,确保DEBUG、INFO、WARNING、ERROR级别的日志都能被记录
|
||||
logger.add(self.config.LOG_FILE, level="DEBUG")
|
||||
|
||||
def _initialize_file_baseline(self):
|
||||
"""
|
||||
|
||||
@@ -4,17 +4,15 @@ LaTeX 数学公式转 SVG 渲染器
|
||||
"""
|
||||
|
||||
import io
|
||||
import logging
|
||||
from typing import Optional
|
||||
import matplotlib
|
||||
import matplotlib.pyplot as plt
|
||||
from matplotlib import mathtext
|
||||
from loguru import logger
|
||||
|
||||
# 使用非交互式后端
|
||||
matplotlib.use('Agg')
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class MathToSVG:
|
||||
"""将 LaTeX 数学公式转换为 SVG 的转换器"""
|
||||
@@ -185,12 +183,6 @@ if __name__ == "__main__":
|
||||
# 测试代码
|
||||
import sys
|
||||
|
||||
# 配置日志
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
||||
)
|
||||
|
||||
# 测试公式
|
||||
test_formulas = [
|
||||
r"E = mc^2",
|
||||
|
||||
Reference in New Issue
Block a user