Skip to content

Commit 84060f2

Browse files
committed
debug, need to start somewhere :)
1 parent c2934ba commit 84060f2

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/datasync/logger.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import sys
23

34
import structlog
45

@@ -15,7 +16,7 @@ def configure_logger(logging_level=logging.NOTSET):
1516
],
1617
wrapper_class=structlog.make_filtering_bound_logger(logging_level),
1718
context_class=dict,
18-
logger_factory=structlog.PrintLoggerFactory(),
19+
logger_factory=structlog.PrintLoggerFactory(file=sys.stderr),
1920
cache_logger_on_first_use=False,
2021
)
2122
return structlog.get_logger()

src/datasync/pit_registering_salmon.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -453,19 +453,17 @@ def replicate(
453453
os.environ["DUCKDB"] = f"{{type: duckdb, instance: {duckdb_path}}}"
454454

455455
if not any([readers, tags, environment]):
456-
typer.BadParameter(
456+
raise typer.BadParameter(
457457
"Error: At least one data type must be selected "
458458
"(--readers, --tags, or --environment)"
459459
)
460-
raise typer.Exit(1)
461460

462461
if not Path(duckdb_path).exists():
463-
typer.BadParameter(f"Error: DuckDB file not found at {duckdb_path}")
464-
raise typer.Exit(1)
462+
raise typer.BadParameter(f"Error: DuckDB file not found at {duckdb_path}")
465463

466464
# only include configs for enabled data types that have data
467465
stream_configs = {}
468-
466+
log.info("Testing hallo do you come here??")
469467
if readers and check_table_has_data(duckdb_path, "readers_voltage", dataset_name):
470468
stream_configs["readers"] = {
471469
"table_name": f"{dataset_name}.readers_voltage",

0 commit comments

Comments
 (0)