[Libreoffice-commits] online.git: loolwsd/DocumentBroker.cpp loolwsd/LOOLKit.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Fri Nov 4 05:18:17 UTC 2016
loolwsd/DocumentBroker.cpp | 9 +++++----
loolwsd/LOOLKit.cpp | 9 +++++----
2 files changed, 10 insertions(+), 8 deletions(-)
New commits:
commit d17d148880a4fc4f491b979a2207a05fca18ba8b
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Fri Nov 4 00:50:51 2016 -0400
loolwsd: logging improvements
Change-Id: If291bf20ae59085f2120d4c92a26de6ccddbc98a
Reviewed-on: https://gerrit.libreoffice.org/30553
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp
index cbca3cd..754b836 100644
--- a/loolwsd/DocumentBroker.cpp
+++ b/loolwsd/DocumentBroker.cpp
@@ -160,16 +160,17 @@ DocumentBroker::DocumentBroker(const Poco::URI& uriPublic,
assert(!_docKey.empty());
assert(!_childRoot.empty());
- Log::info("DocumentBroker [" + _uriPublic.toString() + "] created. DocKey: [" + _docKey + "]");
+ LOG_INF("DocumentBroker [" << _uriPublic.toString() <<
+ "] created. DocKey: [" << _docKey << "]");
}
DocumentBroker::~DocumentBroker()
{
Admin::instance().rmDoc(_docKey);
- Log::info() << "~DocumentBroker [" << _uriPublic.toString()
- << "] destroyed with " << _sessions.size()
- << " sessions left." << Log::end;
+ LOG_INF("~DocumentBroker [" << _uriPublic.toString() <<
+ "] destroyed with " << _sessions.size() <<
+ " sessions left.");
if (!_sessions.empty())
{
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index c257e0b..cadd10d 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -789,7 +789,7 @@ private:
}
catch (const std::exception& exc)
{
- Log::error("Exception while loading [" + uri + "] : " + exc.what());
+ LOG_ERR("Exception while loading [" << uri << "] : " << exc.what());
return nullptr;
}
@@ -806,13 +806,13 @@ private:
void onUnload(const ChildSession& session) override
{
const auto& sessionId = session.getId();
- Log::info("Unloading [" + sessionId + "].");
+ LOG_INF("Unloading session [" << sessionId << "] on url [" << _url << "].");
_tileQueue->removeCursorPosition(session.getViewId());
if (_loKitDocument == nullptr)
{
- Log::error("Unloading session [" + sessionId + "] without loKitDocument.");
+ LOG_ERR("Unloading session [" << sessionId << "] without loKitDocument.");
return;
}
@@ -829,7 +829,8 @@ private:
_loKitDocument->registerCallback(nullptr, nullptr);
_loKitDocument->destroyView(viewId);
_viewIdToCallbackDescr.erase(viewId);
- Log::debug("Destroyed view " + std::to_string(viewId));
+ LOG_DBG("Destroyed view [" << viewId << "] with session [" <<
+ sessionId << "] on url [" << _url << "].");
// Get the list of view ids from the core
const int viewCount = _loKitDocument->getViewsCount();
More information about the Libreoffice-commits
mailing list