Skip to content

Commit 16c66a4

Browse files
author
Scott Sanderson
authored
Merge pull request #2430 from willianpaixao/willianpaixao_logging-improvements
DOC: Improvements on logging
2 parents a1eb9b8 + 769bc8e commit 16c66a4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

zipline/data/bundles/core.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from contextlib2 import ExitStack
88
import click
9+
from logbook import Logger
910
import pandas as pd
1011
from trading_calendars import get_calendar
1112
from toolz import curry, complement, take
@@ -28,6 +29,8 @@
2829
import zipline.utils.paths as pth
2930
from zipline.utils.preprocess import preprocess
3031

32+
log = Logger(__name__)
33+
3134

3235
def asset_db_path(bundle_name, timestr, environ=None, db_version=None):
3336
return pth.data_path(
@@ -432,6 +435,7 @@ def ingest(name,
432435
raise ValueError('Need to ingest a bundle that creates '
433436
'writers in order to downgrade the assets'
434437
' db.')
438+
log.info("Ingesting {}.", name)
435439
bundle.ingest(
436440
environ,
437441
asset_db_writer,
@@ -605,6 +609,7 @@ def should_clean(name):
605609
cleaned = set()
606610
for run in all_runs:
607611
if should_clean(run):
612+
log.info("Cleaning {}.", run)
608613
path = pth.data_path([name, run], environ=environ)
609614
shutil.rmtree(path)
610615
cleaned.add(path)

0 commit comments

Comments
 (0)