From 6d975e39591b2a6fb3e687947cacca713ac97b1b Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Thu, 14 May 2020 22:40:02 +0200 Subject: [PATCH] Add some debugging to the logdetail callback Signed-off-by: Pierre-Yves Chibon --- callback_plugins/logdetail.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/callback_plugins/logdetail.py b/callback_plugins/logdetail.py index fb2f19427a..4b2aba5ec9 100644 --- a/callback_plugins/logdetail.py +++ b/callback_plugins/logdetail.py @@ -263,7 +263,10 @@ class CallbackModule(CallbackBase): info['check'] = self.play_context.check_mode info['diff'] = self.play_context.diff logmech.play_info = info - logmech.play_log(json.dumps(info, indent=4)) + try: + logmech.play_log(json.dumps(info, indent=4)) + except TypeError: + print("Failed to conver to JSON:", info) def v2_playbook_on_stats(self, stats):