Skip to content

Commit ab7a656

Browse files
committed
fix error level logging after upstream changes
1 parent c915192 commit ab7a656

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

zavod/zavod/cli/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,17 @@ def _load_datasets(paths: List[Path]) -> Dataset:
5656

5757
@click.group(help="Zavod data factory")
5858
@click.option("--debug", is_flag=True, default=False)
59+
@click.option("--error", is_flag=True, default=False)
5960
@click.option(
6061
"--ping-heartbeat-url", default=None, help="URL to GET on successful completion"
6162
)
62-
def cli(debug: bool = False, ping_heartbeat_url: str | None = None) -> None:
63+
def cli(debug: bool = False, error: bool = False, ping_heartbeat_url: str | None = None) -> None:
6364
settings.DEBUG = debug
65+
settings.ERROR = error
6466

6567
level = logging.DEBUG if debug else logging.INFO
68+
level = logging.ERROR if error else level
69+
6670
configure_logging(level=level)
6771
create_db()
6872

zavod/zavod/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
# Debug mode
1313
DEBUG = as_bool(env_str("ZAVOD_DEBUG", "false"))
1414

15+
# Error mode
16+
ERROR = as_bool(env_str("ZAVOD_ERROR", "false"))
17+
1518
# Default paths
1619
_META_RESOURCE_DEFAULT = Path(__file__).parent.parent.parent / "meta"
1720
META_RESOURCE_PATH = Path(

0 commit comments

Comments
 (0)