[Libreoffice-commits] online.git: loolwsd/DocumentBroker.hpp loolwsd/LOOLBroker.cpp loolwsd/LOOLWSD.cpp loolwsd/MasterProcessSession.cpp loolwsd/Storage.hpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Wed Mar 23 00:03:54 UTC 2016


 loolwsd/DocumentBroker.hpp       |    3 +--
 loolwsd/LOOLBroker.cpp           |    2 +-
 loolwsd/LOOLWSD.cpp              |    2 ++
 loolwsd/MasterProcessSession.cpp |    1 +
 loolwsd/Storage.hpp              |    3 ++-
 5 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit ca9c14dfdd7bd1f7007121b24867b46d7e9c3940
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Mon Mar 21 08:28:18 2016 -0400

    loolwsd: logs and comments
    
    Change-Id: I2fbfb7ee7ada48390bec65ee6911bde00885fbdb
    Reviewed-on: https://gerrit.libreoffice.org/23450
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/DocumentBroker.hpp b/loolwsd/DocumentBroker.hpp
index 2686af3..ac59213 100644
--- a/loolwsd/DocumentBroker.hpp
+++ b/loolwsd/DocumentBroker.hpp
@@ -86,8 +86,7 @@ public:
 
         if (_storage)
         {
-            // Already loaded. Only validate.
-
+            // Already loaded. Nothing to do.
             return true;
         }
 
diff --git a/loolwsd/LOOLBroker.cpp b/loolwsd/LOOLBroker.cpp
index 81bf06f..890bf04 100644
--- a/loolwsd/LOOLBroker.cpp
+++ b/loolwsd/LOOLBroker.cpp
@@ -836,7 +836,7 @@ int main(int argc, char** argv)
             // Figure out how many children we need. Always create at least as many
             // as configured pre-spawn or one more than requested (whichever is larger).
             int spawn = std::max(static_cast<int>(forkCounter) + 1, numPreSpawnedChildren);
-            Log::debug() << "Creating " << spawn << (spawn == 1 ? "child" : "children") << ". Current total: "
+            Log::debug() << "Creating " << spawn << (spawn == 1 ? " child" : " children") << ". Current total: "
                          << total << ", Empty: " << empty << Log::end;
             do
             {
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 38b57cc..2d3dd66 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -630,6 +630,8 @@ private:
 
         if (docBroker->getSessionsCount() == 1 && !normalShutdown)
         {
+            //TODO: This really should move to the kit, where it
+            // knows if a doc is unsaved, and if other views are open.
             Log::info("Non-deliberate shutdown of the last session, saving the document before tearing down.");
             queue.put("uno .uno:Save");
         }
diff --git a/loolwsd/MasterProcessSession.cpp b/loolwsd/MasterProcessSession.cpp
index 52c8b81..f7b26ce 100644
--- a/loolwsd/MasterProcessSession.cpp
+++ b/loolwsd/MasterProcessSession.cpp
@@ -778,6 +778,7 @@ void MasterProcessSession::dispatchChild()
     _peer = childSession;
     childSession->_peer = shared_from_this();
     childSession->_docBroker = _docBroker;
+    Log::debug("Connected " + getName() + " - " + childSession->getName() + ".");
 
     std::ostringstream oss;
     oss << "load";
diff --git a/loolwsd/Storage.hpp b/loolwsd/Storage.hpp
index d185957..4fe14af 100644
--- a/loolwsd/Storage.hpp
+++ b/loolwsd/Storage.hpp
@@ -35,6 +35,7 @@ public:
         _jailPath(jailPath),
         _uri(uri)
     {
+        Log::debug("Storage ctor: " + uri);
     }
 
     std::string getLocalRootPath() const
@@ -180,7 +181,7 @@ public:
         logger << "WOPI::GetFile header for URI [" << _uri << "]:\n";
         for (auto& pair : response)
         {
-            logger << '\t' + pair.first + ": " + pair.second << '\n';
+            logger << '\t' + pair.first + ": " + pair.second << " / ";
         }
 
         logger << Log::end;


More information about the Libreoffice-commits mailing list