Spaces:
Sleeping
Sleeping
Commit
·
f268a5e
1
Parent(s):
fd1329c
Fix: Redirect service logs to stdout for better debugging
Browse files
Back-end/services/live_stream_service.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import os
|
|
|
|
| 2 |
import logging
|
| 3 |
import json
|
| 4 |
import asyncio
|
|
@@ -15,7 +16,7 @@ from langgraph.graph import StateGraph, END, START
|
|
| 15 |
from tenacity import retry, stop_after_attempt, wait_exponential
|
| 16 |
|
| 17 |
# Configuration du logger
|
| 18 |
-
logging.basicConfig(level=logging.
|
| 19 |
logger = logging.getLogger("live_stream_service")
|
| 20 |
|
| 21 |
# URLs des micro-services
|
|
|
|
| 1 |
import os
|
| 2 |
+
import sys
|
| 3 |
import logging
|
| 4 |
import json
|
| 5 |
import asyncio
|
|
|
|
| 16 |
from tenacity import retry, stop_after_attempt, wait_exponential
|
| 17 |
|
| 18 |
# Configuration du logger
|
| 19 |
+
logging.basicConfig(level=logging.INFO, format="%(asctime)s [%(levelname)s] %(message)s", stream=sys.stdout)
|
| 20 |
logger = logging.getLogger("live_stream_service")
|
| 21 |
|
| 22 |
# URLs des micro-services
|
Back-end/services/tts_service.py
CHANGED
|
@@ -5,6 +5,7 @@ from pydantic import BaseModel
|
|
| 5 |
from gtts import gTTS
|
| 6 |
import hashlib
|
| 7 |
import os
|
|
|
|
| 8 |
import logging
|
| 9 |
import uvicorn
|
| 10 |
from pathlib import Path
|
|
@@ -13,7 +14,8 @@ from fastapi.middleware.cors import CORSMiddleware
|
|
| 13 |
# Configuration du logging
|
| 14 |
logging.basicConfig(
|
| 15 |
level=logging.INFO,
|
| 16 |
-
format="%(asctime)s | %(levelname)s | %(name)s | %(message)s"
|
|
|
|
| 17 |
)
|
| 18 |
logger = logging.getLogger("TTS_Service")
|
| 19 |
|
|
|
|
| 5 |
from gtts import gTTS
|
| 6 |
import hashlib
|
| 7 |
import os
|
| 8 |
+
import sys
|
| 9 |
import logging
|
| 10 |
import uvicorn
|
| 11 |
from pathlib import Path
|
|
|
|
| 14 |
# Configuration du logging
|
| 15 |
logging.basicConfig(
|
| 16 |
level=logging.INFO,
|
| 17 |
+
format="%(asctime)s | %(levelname)s | %(name)s | %(message)s",
|
| 18 |
+
stream=sys.stdout
|
| 19 |
)
|
| 20 |
logger = logging.getLogger("TTS_Service")
|
| 21 |
|