Skip to content

Commit

Permalink
create logs dir for provider
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalum committed Oct 13, 2023
1 parent fddae21 commit 5185302
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/provider.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import time
import logging
import numpy as np
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 5185302

Please sign in to comment.