откат изменения логирования
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user