yourusername commited on
Commit
c070f8c
1 Parent(s): e88b792

:bug: add log_files dir if not exists

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -27,6 +27,9 @@ logs.propagate = False
27
 
28
  if not logs.handlers:
29
 
 
 
 
30
  # Logging info to log file
31
  file = logging.FileHandler("./log_files/app.log")
32
  fileformat = logging.Formatter("%(asctime)s:%(message)s")
 
27
 
28
  if not logs.handlers:
29
 
30
+ if not isdir("./log_files/"):
31
+ mkdir("./log_files/")
32
+
33
  # Logging info to log file
34
  file = logging.FileHandler("./log_files/app.log")
35
  fileformat = logging.Formatter("%(asctime)s:%(message)s")