откат изменения логирования

This commit is contained in:
Dev PC
2025-08-04 20:39:41 +03:00
parent b9a37aea9c
commit 6fc921d2d5
4 changed files with 24 additions and 23 deletions
+3 -3
View File
@@ -10,9 +10,9 @@ import aiohttp
def loggingDict(title: str, data: dict) -> None:
call_id = data.get("call_session_id", "None")
today = datetime.now().strftime("%Y-%m-%d")
file_name = f"log/post/{today}/{call_id}.log"
if not os.path.exists(f"log/post/{today}"):
os.makedirs(f"log/post/{today}")
file_name = f"log/{today}/{call_id}.log"
if not os.path.exists(f"log/{today}"):
os.makedirs(f"log/{today}")
with open(file_name, "a") as f:
f.write(f"{title}:\n{json.dumps(data, indent=4)}\n\n")