Skip to content

Commit 0e4cd99

Browse files
committed
debug: add print statements to custom_logger
1 parent e4bf12a commit 0e4cd99

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

callback_plugins/custom_logger.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(self):
3737
self.output_dir = os.path.expanduser("~/")
3838
self.results = {}
3939

40-
def playbook_on_stats(self, stats):
40+
def v2_playbook_on_stats(self, stats):
4141
#Log results for each host
4242
hosts= stats.processed
4343
for host in hosts:
@@ -59,6 +59,7 @@ def log_task_result(self, host, result, task_name):
5959

6060
# Gather the result data to be used in the summary log.
6161
if host not in self.results:
62+
print("host was not in results, adding a new value to self.results")
6263
self.results[host] = {'passed': 0, 'failed': 0, 'skipped': 0, 'failed_task_names':[], 'ok_task_names':[] }
6364
if result == 'failed':
6465
self.results[host]['failed_task_names'].append(task_name)
@@ -69,6 +70,7 @@ def log_task_result(self, host, result, task_name):
6970
def log_summary_results(self, host):
7071
# The issue is presenting itself in this method
7172
file_path = os.path.join(self.output_dir, f"summary_results.log")
73+
print("Writing results to %s" % file_path)
7274
# temperorily add more detail to the output
7375
print(self.results)
7476

0 commit comments

Comments
 (0)