fix(logger): Use correct fd when testing if it's a tty

This commit is contained in:
Michael Carlberg 2016-10-15 02:40:05 +02:00
parent c94282783d
commit 048f09abc3

View File

@ -38,7 +38,7 @@ class logger {
* Construct logger * Construct logger
*/ */
explicit logger(loglevel level) : m_level(level) { explicit logger(loglevel level) : m_level(level) {
if (isatty(STDOUT_FILENO)) { if (isatty(m_fd)) {
// clang-format off // clang-format off
m_prefixes[loglevel::TRACE] = "\r\033[0;90m- "; m_prefixes[loglevel::TRACE] = "\r\033[0;90m- ";
m_prefixes[loglevel::INFO] = "\r\033[1;32m* \033[0m"; m_prefixes[loglevel::INFO] = "\r\033[1;32m* \033[0m";