move in open function
This commit is contained in:
@@ -3,8 +3,9 @@ import os
|
|||||||
|
|
||||||
if not os.path.exists("logs"):
|
if not os.path.exists("logs"):
|
||||||
os.mkdir("logs")
|
os.mkdir("logs")
|
||||||
with open("logs/application.log", "w") as f:
|
#open and close the file to create it
|
||||||
pass
|
with open("logs/application.log", "w") as f:
|
||||||
|
pass
|
||||||
|
|
||||||
# Create a common file handler for all loggers
|
# Create a common file handler for all loggers
|
||||||
common_file_handler = logging.FileHandler("logs/application.log")
|
common_file_handler = logging.FileHandler("logs/application.log")
|
||||||
|
|||||||
Reference in New Issue
Block a user