Commit ec4fb8e9 by Calen Pennington

Prefer arguments passed to formatter functions to pulling values from the callback_module

parent 66ab942a
...@@ -97,7 +97,7 @@ class JsonFormatter(object): ...@@ -97,7 +97,7 @@ class JsonFormatter(object):
for name, timestamp in results: for name, timestamp in results:
log_message = { log_message = {
'task': name, 'task': name,
'playbook': self.callback_module.playbook_name, 'playbook': playbook_name,
'started_at': timestamp.start.isoformat(), 'started_at': timestamp.start.isoformat(),
'ended_at': timestamp.end.isoformat(), 'ended_at': timestamp.end.isoformat(),
'duration': timestamp.duration.total_seconds(), 'duration': timestamp.duration.total_seconds(),
...@@ -123,7 +123,7 @@ class JsonFormatter(object): ...@@ -123,7 +123,7 @@ class JsonFormatter(object):
with open(log_path, 'a') as outfile: with open(log_path, 'a') as outfile:
log_message = { log_message = {
'playbook': self.callback_module.playbook_name, 'playbook': playbook_name,
'started_at': self.callback_module.playbook_timestamp.start.isoformat(), 'started_at': self.callback_module.playbook_timestamp.start.isoformat(),
'ended_at': self.callback_module.playbook_timestamp.end.isoformat(), 'ended_at': self.callback_module.playbook_timestamp.end.isoformat(),
'duration': duration, 'duration': duration,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment