make name a required argument and add fallback to getEffectiveLevel

This commit is contained in:
gcarq
2018-03-25 21:05:10 +02:00
parent a2c3df3ac5
commit 3f8d7dae39
14 changed files with 20 additions and 21 deletions

View File

@@ -10,7 +10,7 @@ from freqtrade.exchange import get_ticker_history
from freqtrade.logger import Logger
from user_data.hyperopt_conf import hyperopt_optimize_conf
logger = Logger(name=__name__).get_logger()
logger = Logger(__name__).get_logger()
def trim_tickerlist(tickerlist: List[Dict], timerange: Tuple[Tuple, int, int]) -> List[Dict]:

View File

@@ -32,7 +32,7 @@ class Backtesting(object):
def __init__(self, config: Dict[str, Any]) -> None:
# Init the logger
self.logging = Logger(name=__name__, level=config['loglevel'])
self.logging = Logger(__name__, level=config['loglevel'])
self.logger = self.logging.get_logger()
self.config = config
self.analyze = None
@@ -301,7 +301,7 @@ def start(args: Namespace) -> None:
"""
# Initialize logger
logger = Logger(name=__name__).get_logger()
logger = Logger(__name__).get_logger()
logger.info('Starting freqtrade in Backtesting mode')
# Initialize configuration

View File

@@ -44,7 +44,7 @@ class Hyperopt(Backtesting):
super().__init__(config)
# Rename the logging to display Hyperopt file instead of Backtesting
self.logging = Logger(name=__name__, level=config['loglevel'])
self.logging = Logger(__name__, level=config['loglevel'])
self.logger = self.logging.get_logger()
# set TARGET_TRADES to suit your number concurrent trades so its realistic
@@ -598,7 +598,7 @@ def start(args: Namespace) -> None:
logging.getLogger('hyperopt.tpe').setLevel(logging.WARNING)
# Initialize logger
logger = Logger(name=__name__).get_logger()
logger = Logger(__name__).get_logger()
logger.info('Starting freqtrade in Hyperopt mode')
# Initialize configuration