diff options
Diffstat (limited to 'python/download_markit_quotes.py')
| -rw-r--r-- | python/download_markit_quotes.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/python/download_markit_quotes.py b/python/download_markit_quotes.py index ca8298db..2070a7bd 100644 --- a/python/download_markit_quotes.py +++ b/python/download_markit_quotes.py @@ -8,6 +8,10 @@ from selenium.webdriver.support.ui import WebDriverWait import time, os from config import markit_login, markit_password from insert_tranche_quotes import insert_quotes +import logging +logging.basicConfig(filename='/home/share/CorpCDOs/logs/download_tranche_quotes.log', + level=logging.INFO, + format='%(asctime)s %(message)s') profile = FirefoxProfile() profile.set_preference('browser.download.folderList', 2) # custom location @@ -39,9 +43,9 @@ while (not os.path.exists("/tmp/Quotes.csv") or total_wait==10): time.sleep(1) total_wait += 1 if total_wait==10: - print("failed to download quotes") + logging.info("failed to download quotes") else: - print("download worked") + logging.info("download worked") insert_quotes(quote_dir="/tmp") driver.close() |
