kit/Kit.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-)
New commits: commit 94ed8393c59c124ab810dcad59000dcf0dea8c61 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Wed Dec 21 21:21:11 2016 -0500 wsd: improved document/view loading logs in Kit Change-Id: I51a86b73463dbbaa1875dde14be3745f69e097ef Reviewed-on: https://gerrit.libreoffice.org/32555 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/kit/Kit.cpp b/kit/Kit.cpp index c39a31b..b727762 100644 --- a/kit/Kit.cpp +++ b/kit/Kit.cpp @@ -887,8 +887,9 @@ private: { std::unique_lock<std::mutex> lock(_mutex); - LOG_INF("Loading session [" << sessionId << "] on url [" << uri << - "] is loading. " << _sessions.size() << " views loaded."); + LOG_INF("Loading url [" << uri << + "] for session [" << sessionId << "] which has " << _sessions.size() << + " views loaded. Another load in progress: " << _isLoading); while (_isLoading) { @@ -909,12 +910,13 @@ private: } catch (const std::exception& exc) { - LOG_ERR("Exception while loading [" << uri << "] : " << exc.what()); + LOG_ERR("Exception while loading url [" << uri << + "] for session [" << sessionId << "]: " << exc.what()); return false; } // Done loading, let the next one in (if any). - assert(_loKitDocument && _loKitDocument->get() && "Uninitialized lok::Document instance"); + LOG_CHECK_RET(_loKitDocument && _loKitDocument->get() && "Uninitialized lok::Document instance", false); lock.lock(); --_isLoading; _cvLoading.notify_one(); @@ -951,8 +953,8 @@ private: _loKitDocument->getViewIds(viewIds.data(), viewCount); LOG_INF("Document [" << _url << "] session [" << - sessionId << "] unloaded. Have " << viewCount << - " view" << (viewCount != 1 ? "s" : "")); + sessionId << "] unloaded view [" << viewId << "]. Have " << + viewCount << " view" << (viewCount != 1 ? "s" : "")); lockLokDoc.unlock(); @@ -1180,9 +1182,9 @@ private: } } - LOG_INF("Loading view to document from URI: [" << uri << "] for session [" << sessionId << "]."); + LOG_INF("Creating view to url [" << uri << "] for session [" << sessionId << "]."); _loKitDocument->createView(); - LOG_TRC("View created."); + LOG_TRC("View to url [" << uri << "] created."); } Util::assertIsLocked(lockLokDoc); @@ -1222,8 +1224,9 @@ private: _loKitDocument->registerCallback(ViewCallback, _viewIdToCallbackDescr[viewId].get()); const int viewCount = _loKitDocument->getViewsCount(); - LOG_INF("Document [" << _url << "] view [" << viewId << "] loaded. Have " << - viewCount << " view" << (viewCount != 1 ? "s." : ".")); + LOG_INF("Document url [" << _url << "] for session [" << + sessionId << "] loaded view [" << viewId << "]. Have " << + viewCount << " view" << (viewCount != 1 ? "s" : "")); return _loKitDocument; } @@ -1341,8 +1344,8 @@ private: } else { - LOG_ERR("Session thread for session " << session->getId() << " for view " << - viewId << " is not running. Dropping [" << LOKitHelper::kitCallbackTypeToString(type) << + LOG_ERR("Session-thread of session [" << session->getId() << "] for view [" << + viewId << "] is not running. Dropping [" << LOKitHelper::kitCallbackTypeToString(type) << "] payload [" << payload << "]."); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits