src/core/utils/log.cpp
bool DefaultLogger::is_terminal(std::ostream& stream) {
    if(&std::cout == &stream) {
        return static_cast<bool>(isatty(fileno(stdout)));
    }
    if(&std::cerr == &stream) {
        return static_cast<bool>(isatty(fileno(stderr)));
    }

    return false;
}
/*
 * It is impossible to know for sure a terminal has support for all extra terminal features, but every modern terminal has
 * this so we just assume it.
 */
It is impossible to know for sure a terminal has support for all extra terminal features, but every modern terminal has
this so we just assume it.
It is impossible to know for sure a terminal has support for all extra terminal features but every modern terminal has this so we just assume it .
bool DefaultLogger::is_terminal(std::ostream& stream) {
    if(&std::cout == &stream) {
        return static_cast<bool>(isatty(fileno(stdout)));
    }
    if(&std::cerr == &stream) {
        return static_cast<bool>(isatty(fileno(stderr)));
    }
    return false;
}
bool DefaultLogger :: is_terminal ( std :: ostream & stream ) { if ( & std :: cout == & stream ) { return static_cast < bool > ( isatty ( fileno ( stdout ) ) ) ; } if ( & std :: cerr == & stream ) { return static_cast < bool > ( isatty ( fileno ( stderr ) ) ) ; } return false ; }
It is impossible to know for sure a terminal has support for all extra terminal features, but every modern terminal has
 this so we just assume it.
It is impossible to know for sure a terminal has support for all extra terminal features but every modern terminal has this so we just assume it .