From 3cefa993cfea01cfd9eb4c443d192f2c44772980 Mon Sep 17 00:00:00 2001 From: mancini <mancini@astron.nl> Date: Thu, 10 Nov 2022 15:16:07 +0100 Subject: [PATCH] Add debug info --- atdb/prune.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/atdb/prune.py b/atdb/prune.py index 21b22e1..cb9b594 100644 --- a/atdb/prune.py +++ b/atdb/prune.py @@ -30,7 +30,7 @@ def extract_surls_from_obj( for value in obj: extract_surls_from_obj(value, partial=partial) except KeyError as exception: - logging.exception(exception) + logger.exception(exception) return partial @@ -51,10 +51,13 @@ def remove_surl_locations(surls: List[str], dry_run=False) -> None: for surl in surls: if not dry_run: - logging.debug("removing file: %s", context.stat(surl)) + + logger.debug("removing surl %s", surl) + logger.debug("file stats are:", context.stat(surl)) context.release(surl) else: - logging.info("removing file: %s", context.stat(surl)) + logger.info("[dry-run] removing surl %s", surl) + logger.info("file stats are: %s", context.stat(surl)) def prune(args): -- GitLab