No tty disabled colored output
rphillips opened this issue · 6 comments
Love the library. I may implement the colorized output formatter with the colors disabled without a tty for a project of mine . Is this a feature you have considered or planned?
@rphillips What do you mean by that? Currently, if no TTY is attached the formatter automatically switches to uncoloured output of the following format:
time="Mar 13 16:50:44" level=debug msg="Started observing beach" animal=walrus number=8
time="Mar 13 16:50:44" level=info msg="Temperature changes" temperature=-4
or you rather want to retain the original format but without colours?
I am thinking the original format but without colours.
This can be done if you implement the color theme I told you in an other issue.
Just make a color scheme "NoColor", and force tty.
Or am I missing something?
@bastienbc I still think that these are two separate issues. I will add a switch here to disable logfmt output. And depending on TTY availability default output may be coloured or not. And separately there will be support of color schemes based on https://github.com/mgutz/ansi styling rules.
Thank you!