Commit 1d53f992 by Calen Pennington

Fail-fast when logging without datadog api initialization

parent d021ea9a
......@@ -57,7 +57,9 @@ class DatadogFormatter(Formatter):
return value.replace(" | ", ".").replace(" ", "-").lower()
def log_play(self, playbook_name, playbook_timestamp, results):
if self.datadog_api_initialized:
if not self.datadog_api_initialized:
return
datadog_tasks_metrics = []
for name, timestamp in results.items():
datadog_tasks_metrics.append({
......
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