From b60ce8a71ebfa942634bc46c839aa06a92075d91 Mon Sep 17 00:00:00 2001 From: Ali Parlakci Date: Sun, 22 Jul 2018 17:38:35 +0300 Subject: [PATCH] Put log files in a folder --- src/tools.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/tools.py b/src/tools.py index e8a1c42..4965e71 100644 --- a/src/tools.py +++ b/src/tools.py @@ -75,8 +75,10 @@ def createLogFile(TITLE): put given arguments inside \"HEADER\" key """ - folderDirectory = GLOBAL.directory / str(time.strftime("%d-%m-%Y_%H-%M-%S", - time.localtime(GLOBAL.RUN_TIME))) + folderDirectory = GLOBAL.directory / "LOG_FILES" / \ + str(time.strftime( + "%d-%m-%Y_%H-%M-%S",time.localtime(GLOBAL.RUN_TIME) + )) logFilename = TITLE.upper()+'.json' if not path.exists(folderDirectory): @@ -95,7 +97,7 @@ def printToFile(*args, **kwargs): TIME = str(time.strftime("%d-%m-%Y_%H-%M-%S", time.localtime(GLOBAL.RUN_TIME))) - folderDirectory = GLOBAL.directory / TIME + folderDirectory = GLOBAL.directory / "LOG_FILES" / TIME print(*args,**kwargs) if not path.exists(folderDirectory):