From 1d8a31a2aceef1e6ace01e28c07df0e4bd41f55c Mon Sep 17 00:00:00 2001 From: Justin Pettit <47164813+jmpettit@users.noreply.github.com> Date: Sun, 24 Mar 2024 10:49:51 -0500 Subject: [PATCH] test --- nornir_nautobot/plugins/tasks/dispatcher/default.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nornir_nautobot/plugins/tasks/dispatcher/default.py b/nornir_nautobot/plugins/tasks/dispatcher/default.py index 436aa4b..0aab645 100644 --- a/nornir_nautobot/plugins/tasks/dispatcher/default.py +++ b/nornir_nautobot/plugins/tasks/dispatcher/default.py @@ -175,6 +175,10 @@ def generate_config( jinja_env=jinja_env, )[0].result except NornirSubTaskError as exc: + if logger.getEffectiveLevel() == logging.DEBUG: + logger.error("DEBUG ON", extra={"object": obj}) + else: + logger.error("DEBUG OFF", extra={"object": obj}) stack_trace = get_stack_trace(exc.result.exception) error_mapping = {