summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-09-21 18:44:02 +0300
committerAndras Timar <andras.timar@collabora.com>2016-09-21 20:48:00 +0200
commit391d9c0e5e512173c0d13fe9aca587e415b5d9e5 (patch)
tree1c26ef4b62d3d32c1ed879bff3e1e15f8074dd4b
parent4e48f2a5641c0443d3eec39a59a3a63cfc11520e (diff)
Check LOOL_NO_LOGCOLOR here, too1.9.2
Note that just like for loolwsd, LOOL_NO_LOGCOLOR is effective only when stderr is not going to a terminal. If it goes to a terminal, there is no way to avoid use of color, see Log::initialize(). (cherry picked from commit 857c3c4f044f1e4d323576532364c890c7de283e)
-rw-r--r--loolwsd/test/test.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/loolwsd/test/test.cpp b/loolwsd/test/test.cpp
index a8c697c4e..60d694fa0 100644
--- a/loolwsd/test/test.cpp
+++ b/loolwsd/test/test.cpp
@@ -72,7 +72,7 @@ bool filterTests(CPPUNIT_NS::TestRunner& runner, CPPUNIT_NS::Test* testRegistry)
int main(int /*argc*/, char** /*argv*/)
{
- Log::initialize("tst", "trace", true, false);
+ Log::initialize("tst", "trace", !std::getenv("LOOL_NO_LOGCOLOR"), false);
CPPUNIT_NS::TestResult controller;