diff --git a/nornir_nautobot/plugins/tasks/dispatcher/default.py b/nornir_nautobot/plugins/tasks/dispatcher/default.py index b802d29..76961f1 100644 --- a/nornir_nautobot/plugins/tasks/dispatcher/default.py +++ b/nornir_nautobot/plugins/tasks/dispatcher/default.py @@ -176,9 +176,9 @@ def generate_config( )[0].result except NornirSubTaskError as exc: if logger.getEffectiveLevel() == logging.DEBUG: - print("Debugging is on") + logger.error("DEBUG IS ON", extra={"object": obj}) else: - print("Debugging is off") + logger.error("DEBUG IS OFF", extra={"object": obj}) stack_trace = get_stack_trace(exc.result.exception) error_mapping = {