[Libreoffice-commits] online.git: loolwsd/LOOLWSD.cpp loolwsd/README.vars loolwsd/test

Tor Lillqvist tml at collabora.com
Tue Sep 27 09:40:53 UTC 2016


 loolwsd/LOOLWSD.cpp   |    2 +-
 loolwsd/README.vars   |    5 -----
 loolwsd/test/test.cpp |    2 +-
 3 files changed, 2 insertions(+), 7 deletions(-)

New commits:
commit db1733e70d8c67c05c9936d529d806bee97a9437
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Sep 27 12:38:43 2016 +0300

    We don't need to check LOOL_NO_LOGCOLOR any more
    
    Since 429cc9d49be497ca57f7f4a2103581baff547185, we use colour only
    when stderr is going to a terminal.

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index abc2d06..5c81d42 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1400,7 +1400,7 @@ void LOOLWSD::initialize(Application& self)
 
     const auto logLevel = getConfigValue<std::string>(conf, "logging.level", "trace");
     setenv("LOOL_LOGLEVEL", logLevel.c_str(), true);
-    const auto withColor = !std::getenv("LOOL_NO_LOGCOLOR") && getConfigValue<bool>(conf, "logging.color", true);
+    const auto withColor = getConfigValue<bool>(conf, "logging.color", true);
     if (withColor)
     {
         setenv("LOOL_LOGCOLOR", "1", true);
diff --git a/loolwsd/README.vars b/loolwsd/README.vars
index d78b553..305b9ea 100644
--- a/loolwsd/README.vars
+++ b/loolwsd/README.vars
@@ -16,11 +16,6 @@ LOOL_NO_AUTOSAVE        <set/unset>
         if set avoids automatic saving of the document being
         edited.
 
-LOOL_NO_LOGCOLOR        <set/unset>
-        if set avoids use of colour escape sequences in the logging
-        output when it is redirected. When stderr is going to a
-        terminal colour is always used.
-
 SLEEPFORDEBUGGER        <seconds to sleep>
         sleep <n> seconds in the broken process after starting in
         order to allow a 'sudo gdb' session to 'attach <pid>' to them.
diff --git a/loolwsd/test/test.cpp b/loolwsd/test/test.cpp
index 60d694f..d0404dd 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", !std::getenv("LOOL_NO_LOGCOLOR"), false);
+    Log::initialize("tst");
 
 
     CPPUNIT_NS::TestResult controller;


More information about the Libreoffice-commits mailing list