From d1050acbdc30160630dcb847887c2977d36f7e29 Mon Sep 17 00:00:00 2001 From: liuyuanchuang Date: Thu, 12 Mar 2026 12:41:26 +0800 Subject: [PATCH] fix: looger path --- app/api/v1/endpoints/convert.py | 5 ++--- app/core/logging_config.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/api/v1/endpoints/convert.py b/app/api/v1/endpoints/convert.py index af58fdc..c2f8783 100644 --- a/app/api/v1/endpoints/convert.py +++ b/app/api/v1/endpoints/convert.py @@ -1,15 +1,14 @@ """Format conversion endpoints.""" -import logging - from fastapi import APIRouter, Depends, HTTPException from fastapi.responses import Response from app.core.dependencies import get_converter +from app.core.logging_config import get_logger from app.schemas.convert import LatexToOmmlRequest, LatexToOmmlResponse, MarkdownToDocxRequest from app.services.converter import Converter -logger = logging.getLogger(__name__) +logger = get_logger() router = APIRouter() diff --git a/app/core/logging_config.py b/app/core/logging_config.py index 2d0705f..390f229 100644 --- a/app/core/logging_config.py +++ b/app/core/logging_config.py @@ -141,7 +141,7 @@ _logger: logging.Logger | None = None def get_logger() -> logging.Logger: - """Get the global logger instance.""" + """Get the global logger instance, initializing if needed.""" global _logger if _logger is None: _logger = setup_logging()