XCode terminal doesn't interpret colorcoding
For some reason my XCode doesn't interpret the color codes correctly. Because of this the log lines become cluttered with garbage.
It looks like this:
[0m [2m2019-03-24 19:33:34.915 ( 0.002s) [main thread ] cli.cpp:27 INFO| [0mThis is a test [0m
Copy + pasting a line from XCode terminal looks like this:
[0m[2m2019-03-24 19:33:34.915 ( 0.002s) [main thread ] cli.cpp:27 INFO| [0mThis is a test[0m
The OS X Terminal app and iTerm do interpret the color code well.
Any idea of what might be going on?
I get this too. If I remember correctly XCode identifies as a terminal which supports colors – but it doesn't.
The workaround it to set loguru::g_colorlogtostderr = false; when running in XCode. I'd be happy if someone could find a better solution.
Are you aware of a way of finding out programmatically if the code runs from xcode? If so I then could differentiate between xcode and other terminals.