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
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
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