Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
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,
|