dinit-log: Add text color
I just added a couple of lines so that the logging was colored :D
Thanks for opening a PR. To accept this I would require a few changes: since the color sequences are not universal to every terminal, and since some people wouldn't want them anyway, there should be a (documented) way to turn them off (i.e. a command-line argument). Additionally I would like the escape sequences to named macros or constants rather than embed them directly in the message strings.
Other than cleaning up the PR so that it doesn't include a bunch of built files (as Mobin pointed out):
- I notice that the same color is used for "FAILED" as "STOPPD" status. I don't think this should be the case. A service that is "stopped" successfully does not indicate an error.
- the new
--coloroption looks like it is the default anyway so the option has no effect? - new option needs documenting in the manual pages
Looks like this has gone stale, so I'll close for now; feel free to re-open in future.
hey, i'm just bumping this as i love the idea of pretty colors in init and would love to see this be a thing.