Commit 3d1d744e authored by Klaus Zimmermann's avatar Klaus Zimmermann
Browse files

Log selected index definition

parent 2d14b7f6
...@@ -344,17 +344,23 @@ class IndexCatalog: ...@@ -344,17 +344,23 @@ class IndexCatalog:
return PeriodSpecification(selected_period, period_metadata) return PeriodSpecification(selected_period, period_metadata)
indices = [] indices = []
for index in requested_indices: for index_name in requested_indices:
definition = self.get_index_definition(index) definition = self.get_index_definition(index_name)
period_spec = select_period(definition.period) period_spec = select_period(definition.period)
try: try:
index_function = build_index_function(definition.index_function) index_function = build_index_function(definition.index_function)
except TypeError: except TypeError:
logging.error( logging.error(
f"Could not build index function for index " f"Could not build index function for index "
f"{index} from definition {definition}" f"{index_name} from definition {definition}"
) )
raise raise
logging.info(
f"Trying to build index <{index_name}> "
f"with period <{period_spec.type}"
f"({p if (p := period_spec.parameters) is not None else ''})> "
f"from definition in <{definition.source}>"
)
index = Index(index_function, definition, period_spec) index = Index(index_function, definition, period_spec)
indices.append(index) indices.append(index)
return indices return indices
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment