forked from Mirrorlandia_minetest/minetest
Check specific outputs for isatty (#12980)
This commit is contained in:
parent
70a82b0784
commit
4da8a18c8c
@ -124,9 +124,10 @@ public:
|
|||||||
m_stream(stream)
|
m_stream(stream)
|
||||||
{
|
{
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
is_tty = isatty(fileno(stdout));
|
if (&stream == &std::cout)
|
||||||
#else
|
is_tty = isatty(STDOUT_FILENO);
|
||||||
is_tty = false;
|
else if (&stream == &std::cerr)
|
||||||
|
is_tty = isatty(STDERR_FILENO);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,7 +135,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
std::ostream &m_stream;
|
std::ostream &m_stream;
|
||||||
bool is_tty;
|
bool is_tty = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
class FileLogOutput : public ICombinedLogOutput {
|
class FileLogOutput : public ICombinedLogOutput {
|
||||||
|
Loading…
Reference in New Issue
Block a user