From 1680eb1cfa6b7261b9f210064c6c84350f08c6b8 Mon Sep 17 00:00:00 2001 From: matejcik Date: Mon, 30 Jul 2018 15:05:19 +0200 Subject: [PATCH] tools: improve logging in coins_details.py --- tools/coins_details.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/coins_details.py b/tools/coins_details.py index 5c4b407fb9..6f3259dc63 100755 --- a/tools/coins_details.py +++ b/tools/coins_details.py @@ -5,6 +5,7 @@ import time import json import logging import requests +import sys import coin_info LOG = logging.getLogger(__name__) @@ -20,7 +21,7 @@ COINMAKETCAP_CACHE = os.path.join(os.path.dirname(__file__), "coinmarketcap.json COINMARKETCAP_TICKERS_URL = ( "https://api.coinmarketcap.com/v2/ticker/?start={}&convert=USD&limit=100" ) -COINMARKETCAP_GLOBAL_URL = "https://api.coinmarketcap.com/v2/global" +COINMARKETCAP_GLOBAL_URL = "https://api.coinmarketcap.com/v2/global/" def coinmarketcap_init(): @@ -292,6 +293,13 @@ def apply_overrides(coins): if __name__ == "__main__": + # setup logging + root = logging.getLogger() + root.setLevel(logging.DEBUG) + handler = logging.StreamHandler(sys.stdout) + handler.setLevel(logging.DEBUG) + root.addHandler(handler) + defs = coin_info.get_all() support_info = coin_info.support_info(defs, erc20_versions=VERSIONS)