Commit c135f10f by Calen Pennington

Allow ansible timer logging to go into the current working directory

parent 413634a7
...@@ -163,8 +163,9 @@ class JsonTimingLogger(TimingLogger): ...@@ -163,8 +163,9 @@ class JsonTimingLogger(TimingLogger):
log_path = playbook_timestamp.start.strftime(ANSIBLE_TIMER_LOG) log_path = playbook_timestamp.start.strftime(ANSIBLE_TIMER_LOG)
try: try:
if not exists(dirname(log_path)): log_dir = dirname(log_path)
os.makedirs(dirname(log_path)) if log_dir and not exists(log_dir):
os.makedirs(log_dir)
with open(log_path, 'a') as outfile: with open(log_path, 'a') as outfile:
for log_message in messages: for log_message in messages:
......
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