loolwsd/ChildProcessSession.cpp |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 5f7b4762e4a9eb49cd3ccb16050a1dd807534c1e
Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk>
Date:   Tue May 10 07:17:52 2016 -0400

    loolwsd: reduce lokit callback logs
    
    Change-Id: I984f2e1d405b5f95b83efc9e6959fa3140969f4e
    Reviewed-on: https://gerrit.libreoffice.org/24848
    Reviewed-by: Ashod Nakashian <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@gmail.com>

diff --git a/loolwsd/ChildProcessSession.cpp b/loolwsd/ChildProcessSession.cpp
index dcc2021..5050dde 100644
--- a/loolwsd/ChildProcessSession.cpp
+++ b/loolwsd/ChildProcessSession.cpp
@@ -74,10 +74,6 @@ public:
     {
         auto lock = _session.getLock();
 
-        Log::trace() << "CallbackWorker::callback [" << _session.getViewId() 
<< "] "
-                     << LOKitHelper::kitCallbackTypeToString(nType)
-                     << " [" << rPayload << "]." << Log::end;
-
         // Cache important notifications to replay them when our client
         // goes inactive and loses them.
         if (nType == LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR ||
@@ -93,14 +89,15 @@ public:
             _session.setDocState(nType, rPayload);
         }
 
+        const auto typeName = LOKitHelper::kitCallbackTypeToString(nType);
         if (_session.isCloseFrame())
         {
-            Log::trace("Skipping callback on closing session " + 
_session.getName());
+            Log::trace("Skipping callback [" + typeName + "] on closing 
session " + _session.getName());
             return;
         }
         else if (_session.isDisconnected())
         {
-            Log::trace("Skipping callback on disconnected session " + 
_session.getName());
+            Log::trace("Skipping callback [" + typeName + "] on disconnected 
session " + _session.getName());
             return;
         }
         else if (!_session.isActive())
@@ -108,11 +105,13 @@ public:
             // Pass save notifications through.
             if (nType != LOK_CALLBACK_UNO_COMMAND_RESULT || 
rPayload.find(".uno:Save") == std::string::npos)
             {
-                Log::trace("Skipping callback on inactive session " + 
_session.getName());
+                Log::trace("Skipping callback [" + typeName + "] on inactive 
session " + _session.getName());
                 return;
             }
         }
 
+        Log::trace() << "CallbackWorker::callback [" << _session.getName() << 
"]: "
+                     << typeName << " [" << rPayload << "]." << Log::end;
         switch (nType)
         {
         case LOK_CALLBACK_INVALIDATE_TILES:
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to