Closed compenguy closed 7 years ago
Hey thanks for this!
I've looked at it briefly, seems to make sense. Not 100% sure about the check and how it maps onto normal --color=auto
usage, but it seems like a sensible starting point. Did some tweaks to it in #4, will probably merge it later today.
Published in 0.4.0
One of the benefits of logging is dumping the output to a text file for later review.
This change modifies loggerv so that it only prints ansi codes when stdout and stderr are both connect to a controlling terminal. On the other hand, when either is being redirected, color is disabled.
Ideally color would be disabled for stdout and stderr separately, but this change is small, to the point, and takes it 90% of the way to where it wants to be.