mirror of
https://github.com/KevinMidboe/bulk-downloader-for-reddit.git
synced 2025-10-29 17:40:15 +00:00
Put log files in a folder
This commit is contained in:
@@ -75,8 +75,10 @@ def createLogFile(TITLE):
|
|||||||
put given arguments inside \"HEADER\" key
|
put given arguments inside \"HEADER\" key
|
||||||
"""
|
"""
|
||||||
|
|
||||||
folderDirectory = GLOBAL.directory / str(time.strftime("%d-%m-%Y_%H-%M-%S",
|
folderDirectory = GLOBAL.directory / "LOG_FILES" / \
|
||||||
time.localtime(GLOBAL.RUN_TIME)))
|
str(time.strftime(
|
||||||
|
"%d-%m-%Y_%H-%M-%S",time.localtime(GLOBAL.RUN_TIME)
|
||||||
|
))
|
||||||
logFilename = TITLE.upper()+'.json'
|
logFilename = TITLE.upper()+'.json'
|
||||||
|
|
||||||
if not path.exists(folderDirectory):
|
if not path.exists(folderDirectory):
|
||||||
@@ -95,7 +97,7 @@ def printToFile(*args, **kwargs):
|
|||||||
|
|
||||||
TIME = str(time.strftime("%d-%m-%Y_%H-%M-%S",
|
TIME = str(time.strftime("%d-%m-%Y_%H-%M-%S",
|
||||||
time.localtime(GLOBAL.RUN_TIME)))
|
time.localtime(GLOBAL.RUN_TIME)))
|
||||||
folderDirectory = GLOBAL.directory / TIME
|
folderDirectory = GLOBAL.directory / "LOG_FILES" / TIME
|
||||||
print(*args,**kwargs)
|
print(*args,**kwargs)
|
||||||
|
|
||||||
if not path.exists(folderDirectory):
|
if not path.exists(folderDirectory):
|
||||||
|
|||||||
Reference in New Issue
Block a user