diff --git a/backend/server.py b/backend/server.py index fb65f70c..5c10ab90 100644 --- a/backend/server.py +++ b/backend/server.py @@ -24,7 +24,7 @@ import io from modules.whisper.faster_whisper_inference import FasterWhisperInference -from modules.utils.logger import get_logger +from modules.utils.logger import get_backend_logger from modules.vad.silero_vad import SileroVAD from modules.diarize.diarizer import Diarizer from modules.diarize.audio_loader import SAMPLE_RATE @@ -41,7 +41,7 @@ vad_inferencer = None whisper_inferencer = None diarization_inferencer = None -logger = get_logger("Whisper-WebUI-Backend") +logger = get_backend_logger() def format_stream_result(generator: Generator[dict[str, Any], Any, None]): diff --git a/modules/utils/logger.py b/modules/utils/logger.py index 15a2bce4..4f71bd38 100644 --- a/modules/utils/logger.py +++ b/modules/utils/logger.py @@ -1,6 +1,14 @@ import logging +def get_gradio_logger(): + return get_logger("Whisper-WebUI") + + +def get_backend_logger(): + return get_logger("Whisper-WebUI-Backend") + + def get_logger(name: str): logger = logging.getLogger(name)