HaochenGong commited on
Commit
5a6e03c
·
1 Parent(s): 97e7fe5
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -22,8 +22,10 @@ description = "Automated Contextual Privacy Policies Generation for Mobile Apps"
22
 
23
  # log
24
  log_file_path = 'logs/app.log'
25
- if not os.path.exists(log_file_path):
26
- os.makedirs(log_file_path)
 
 
27
 
28
  # set log handler(Generate one log file per day and keep only the latest 7 files)
29
  handler = TimedRotatingFileHandler(log_file_path, when='W0', interval=1, backupCount=7)
 
22
 
23
  # log
24
  log_file_path = 'logs/app.log'
25
+ log_directory = os.path.dirname(log_file_path)
26
+
27
+ if not os.path.exists(log_directory):
28
+ os.makedirs(log_directory)
29
 
30
  # set log handler(Generate one log file per day and keep only the latest 7 files)
31
  handler = TimedRotatingFileHandler(log_file_path, when='W0', interval=1, backupCount=7)