A logging plugin

I took Cliffano Subagio’s “human_logging” gist and made the output a lot more compact—I think it’s easier to read:

https://gist.github.com/pragdave/4b984557676d2d6c92a6

Interpret the Ansible log for humans. In particular, we

look for command executions and format their content

Looks nice. I’ll try this out for, e.g., Rails migrations output. Thanks for sharing this, Dave.

-Baraa

Hi

Thanks very much for this. Its just what I’m looking for.

I wonder however, might it contain a small bug? stdout and stderr are both being output in yellow always rather than stderr being output in bright red which is preferable. I think that the following fixes this:

def display_output(output, color=‘yellow’):

if output:

output = “\n “.join(output.split(”\n”))

print(stringc(" " + output, color))

Best regards

chris

Chris:

You’re right. Fixed.

Thanks

Dave