Skip to content

Commit 116d047

Browse files
committed
Fix logging config
1 parent 44267d7 commit 116d047

File tree

4 files changed

+13
-133
lines changed

4 files changed

+13
-133
lines changed

examples/app.py

Lines changed: 0 additions & 49 deletions
This file was deleted.

examples/bitvavo_trading_bot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
from dotenv import load_dotenv
2+
import logging.config
23

34
from investing_algorithm_framework import MarketCredential, TimeUnit, \
45
CCXTOHLCVMarketDataSource, CCXTTickerMarketDataSource, TradingStrategy, \
5-
create_app, PortfolioConfiguration, Algorithm
6+
create_app, PortfolioConfiguration, Algorithm, DEFAULT_LOGGING_CONFIG
67

78
"""
89
Bitvavo trading bot example with market data sources of bitvavo.
@@ -13,6 +14,8 @@
1314
account on bitvavo.
1415
"""
1516

17+
logging.config.dictConfig(DEFAULT_LOGGING_CONFIG)
18+
1619
# Load the environment variables from the .env file
1720
load_dotenv()
1821

examples/coinbase_trading_bot.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import os
2-
1+
from dotenv import load_dotenv
2+
import logging.config
33
from investing_algorithm_framework import MarketCredential, TimeUnit, \
44
CCXTOHLCVMarketDataSource, CCXTTickerMarketDataSource, TradingStrategy, \
5-
create_app, PortfolioConfiguration, Algorithm, SYMBOLS, RESOURCE_DIRECTORY
6-
5+
create_app, PortfolioConfiguration, Algorithm, DEFAULT_LOGGING_CONFIG
76
"""
87
Coinbase market data sources example. Coinbase requires you to have an API key
98
and secret key to access their market data. You can create them here:
@@ -13,6 +12,12 @@
1312
data sources to the app. You can then use the market data
1413
sources in your trading strategy.
1514
"""
15+
16+
logging.config.dictConfig(DEFAULT_LOGGING_CONFIG)
17+
18+
# Load the environment variables from the .env file
19+
load_dotenv()
20+
1621
# Define your market credential for coinbase, keys are read from .env file
1722
coinbase_market_credential = MarketCredential(
1823
market="coinbase",

examples/test.py

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)