yuchenlin commited on
Commit
b93283b
·
verified ·
1 Parent(s): 474fca3

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -0
utils.py CHANGED
@@ -37,6 +37,8 @@ class Agent(ABC):
37
  def setup_logging():
38
  timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
39
  log_filename = f"logs/swiftsage_log_{timestamp}.txt"
 
 
40
 
41
  logging.basicConfig(
42
  level=logging.INFO,
 
37
  def setup_logging():
38
  timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
39
  log_filename = f"logs/swiftsage_log_{timestamp}.txt"
40
+ # create folder if it doesn't exist
41
+ os.makedirs("logs", exist_ok=True)
42
 
43
  logging.basicConfig(
44
  level=logging.INFO,