emilk / emilk/loguru

Terminal color detection on Linux is wrong

Open
#247 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.9k
Forks
280
Avg merge
7m
Merged PRs (30d)
4

Description

Hi. Colored logs weren't shown on my terminal (alacritty). I have tried to set `loguru::g_colorlogtostderr` to both `true` and `false`, but nothing. I have investigated this further and then I came across this:

https://github.com/emilk/loguru/blob/master/loguru.cpp#L231-L243

That's not how you detect color support in terminals. [(N)Curses should be used.](https://stackoverflow.com/a/7426284/13840624) The current solution is a hack.

If that is not feasible, the list should at least be expanded. I could make a PR for that.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.