From 518530258c5689cadf652da816f20e430c6bb4f3 Mon Sep 17 00:00:00 2001 From: rafalum Date: Fri, 13 Oct 2023 15:05:42 -0700 Subject: [PATCH] create logs dir for provider --- src/provider.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/provider.py b/src/provider.py index 1da01b3..7df0e47 100644 --- a/src/provider.py +++ b/src/provider.py @@ -1,3 +1,4 @@ +import os import time import logging import numpy as np @@ -43,6 +44,7 @@ def __init__(self, sim=False, backtest=False, swap_data=None, mint_data=None, bu self.logger = logging.getLogger('logger3') self.logger.setLevel(logging.INFO) + os.makedirs(os.path.dirname('src/logs/provider.log'), exist_ok=True) handler = logging.FileHandler('src/logs/provider.log') formatter = logging.Formatter('[%(asctime)s] %(levelname)s: %(message)s') handler.setFormatter(formatter)