AashitaK commited on
Commit
0948738
·
verified ·
1 Parent(s): 43d0e07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -3,18 +3,12 @@ import logging
3
  from utils.chatbot_interface4 import ChatbotInterface
4
  # from utils.session_history2 import ChatbotInterface
5
 
6
- # Configure logging to both file and console
7
- log_directory = "logs"
8
- if not os.path.exists(log_directory):
9
- os.makedirs(log_directory)
10
- log_file_path = os.path.join(log_directory, "chatbot.log")
11
-
12
  logging.basicConfig(
13
  level=logging.INFO,
14
  format="%(asctime)s - %(levelname)s - %(message)s",
15
  handlers=[
16
- logging.FileHandler(log_file_path, mode='a', encoding='utf-8'), # Save logs to a file
17
- logging.StreamHandler() # Print logs to the console
18
  ]
19
  )
20
 
 
3
  from utils.chatbot_interface4 import ChatbotInterface
4
  # from utils.session_history2 import ChatbotInterface
5
 
6
+ # Configure logging to the console
 
 
 
 
 
7
  logging.basicConfig(
8
  level=logging.INFO,
9
  format="%(asctime)s - %(levelname)s - %(message)s",
10
  handlers=[
11
+ logging.StreamHandler()
 
12
  ]
13
  )
14