diff options
| author | iamamyth <user@example.com> | 2025-02-19 13:09:35 -0800 |
|---|---|---|
| committer | nahuhh <50635951+nahuhh@users.noreply.github.com> | 2025-12-29 22:29:25 +0000 |
| commit | 1075acee901185b47bd8cac6bd06587429a7df57 (patch) | |
| tree | f56c44664b13ef880c3fb2bf7f952a323cfff79d /external/easylogging++/easylogging++.h | |
| parent | ae08557f713a41f3f7267fcb08bbbe87f18d7932 (diff) | |
| download | monzero-core-1075acee901185b47bd8cac6bd06587429a7df57.tar.gz monzero-core-1075acee901185b47bd8cac6bd06587429a7df57.tar.xz monzero-core-1075acee901185b47bd8cac6bd06587429a7df57.zip | |
logging: Generalize terminal color detection
Assume the terminal supports color codes if TERM ends with `-color` or
`-256color`, rather than special-casing a handful of such terminals.
Co-authored-by: laanwj <126646+laanwj@users.noreply.github.com>
Diffstat (limited to 'external/easylogging++/easylogging++.h')
| -rw-r--r-- | external/easylogging++/easylogging++.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/external/easylogging++/easylogging++.h b/external/easylogging++/easylogging++.h index 3407b8a18..be7fb713a 100644 --- a/external/easylogging++/easylogging++.h +++ b/external/easylogging++/easylogging++.h @@ -1210,7 +1210,9 @@ class OS : base::StaticClass { /// /// @detail For android systems this is device name with its manufacturer and model seperated by hyphen static std::string currentHost(void); - /// @brief Whether or not terminal supports colors + /// @brief Whether or not the named terminal supports colors + static bool termSupportsColor(std::string& term); + /// @brief Whether or not the process's current terminal supports colors static bool termSupportsColor(void); }; /// @brief Contains utilities for cross-platform date/time. This class make use of el::base::utils::Str |
