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