1
0
Fork 0
mirror of synced 2024-06-26 10:00:20 +12:00

Put log files in a folder

This commit is contained in:
Ali Parlakci 2018-07-22 17:38:35 +03:00
parent 49920cc457
commit b60ce8a71e

View file

@ -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):