[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - wsd/ClientSession.cpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Tue Apr 11 12:53:23 UTC 2017


 wsd/ClientSession.cpp  |    3 +--
 wsd/DocumentBroker.cpp |   10 ++++++----
 wsd/DocumentBroker.hpp |    2 +-
 3 files changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 6dad3636fc92f0f22845f6ec0307e0fbe36d9bca
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Sun Apr 9 18:37:27 2017 -0400

    wsd: logging cleanups
    
    Change-Id: Ia06bc5b1e0090c8198ac4ba2b88d5e57f8e2b168
    Reviewed-on: https://gerrit.libreoffice.org/36327
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>
    (cherry picked from commit fa2e2869cfbd5bea7a080be2bff244cdfdbfe084)
    Reviewed-on: https://gerrit.libreoffice.org/36341
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 883b30b1..2af75d21 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -446,8 +446,7 @@ void ClientSession::setReadOnly()
 int ClientSession::getPollEvents(std::chrono::steady_clock::time_point /* now */,
                                  int & /* timeoutMaxMs */)
 {
-    LOG_TRC(getName() << " ClientSession: has queued writes? "
-            << _senderQueue.size());
+    LOG_TRC(getName() << " ClientSession has " << _senderQueue.size() << " write message(s) queued.");
     int events = POLLIN;
     if (_senderQueue.size())
         events |= POLLOUT;
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 6f827175..33f88ef7 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -471,10 +471,12 @@ bool DocumentBroker::load(const std::shared_ptr<ClientSession>& session, const s
     else
     {
         // Check if document has been modified by some external action
-        LOG_DBG("Timestamp now: " << Poco::DateTimeFormatter::format(Poco::DateTime(fileInfo._modifiedTime),
-                                                                     Poco::DateTimeFormat::ISO8601_FORMAT));
-        if (_documentLastModifiedTime != Poco::Timestamp::fromEpochTime(0) &&
-            fileInfo._modifiedTime != Poco::Timestamp::fromEpochTime(0) &&
+        LOG_TRC("Document modified time: " <<
+                Poco::DateTimeFormatter::format(Poco::DateTime(fileInfo._modifiedTime),
+                                                Poco::DateTimeFormat::ISO8601_FORMAT));
+        static const Poco::Timestamp Zero(Poco::Timestamp::fromEpochTime(0));
+        if (_documentLastModifiedTime != Zero &&
+            fileInfo._modifiedTime != Zero &&
             _documentLastModifiedTime != fileInfo._modifiedTime)
         {
             LOG_ERR("Document has been modified behind our back, URI [" << uriPublic.toString() << "].");
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 88fa2b6e..20bdc496 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -152,7 +152,7 @@ public:
         {
             if (_ws)
             {
-                LOG_TRC("DocBroker to Child: " << data);
+                LOG_TRC("Send DocBroker to Child message: [" << data << "].");
                 _ws->sendMessage(data);
                 return true;
             }


More information about the Libreoffice-commits mailing list