Skip to content

Commit

Permalink
Issue #112 minor logging tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Feb 6, 2024
1 parent d8c73af commit c7a095b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/openeo_aggregator/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class AggregatorConfig(dict):
def from_py_file(path: Union[str, Path]) -> 'AggregatorConfig':
"""Load config from Python file."""
path = Path(path)
_log.info(f"Loading config from Python file {path}")
_log.debug(f"Loading config from Python file {path}")
# Based on flask's Config.from_pyfile
with path.open(mode="rb") as f:
code = compile(f.read(), path, "exec")
Expand All @@ -76,6 +76,7 @@ def from_py_file(path: Union[str, Path]) -> 'AggregatorConfig':
for var_name in ["aggregator_config", "config"]:
if var_name in globals:
config = globals[var_name]
_log.info(f"Loaded config from {path=} {var_name=}")
break
else:
raise ConfigException(f"No 'config' variable defined in config file {path}")
Expand Down

0 comments on commit c7a095b

Please sign in to comment.