[Libreoffice-commits] online.git: loolwsd/IoUtil.cpp loolwsd/LOOLBroker.cpp loolwsd/LOOLProtocol.cpp loolwsd/TileCache.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Wed Mar 30 02:03:42 UTC 2016
loolwsd/IoUtil.cpp | 2 +-
loolwsd/LOOLBroker.cpp | 3 ++-
loolwsd/LOOLProtocol.cpp | 4 +++-
loolwsd/TileCache.cpp | 8 ++++----
4 files changed, 10 insertions(+), 7 deletions(-)
New commits:
commit 2ba9bddf9a2a9534e646ea7212601ef935374f8b
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Tue Mar 29 20:56:25 2016 -0400
loolwsd: logging improvements
Change-Id: Ie656aa9d9f19762a960f6608cdadccf3c7eee665
Reviewed-on: https://gerrit.libreoffice.org/23646
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/IoUtil.cpp b/loolwsd/IoUtil.cpp
index c7cc54c..96574c3 100644
--- a/loolwsd/IoUtil.cpp
+++ b/loolwsd/IoUtil.cpp
@@ -168,7 +168,7 @@ void SocketProcessor(std::shared_ptr<WebSocket> ws,
if (!payload.empty())
{
Log::warn(name + "Last message will not be processed: [" +
- LOOLProtocol::getAbbreviatedMessage(payload.data(), payload.size()) + "].");
+ LOOLProtocol::getFirstLine(payload.data(), payload.size()) + "].");
}
}
catch (const WebSocketException& exc)
diff --git a/loolwsd/LOOLBroker.cpp b/loolwsd/LOOLBroker.cpp
index fdb43a3..49e2eef 100644
--- a/loolwsd/LOOLBroker.cpp
+++ b/loolwsd/LOOLBroker.cpp
@@ -277,7 +277,8 @@ public:
const std::string session = tokens[1];
const std::string url = tokens[2];
- Log::debug("Finding kit for URL [" + url + "] on session [" + session + "].");
+ Log::debug("Finding kit for URL [" + url + "] on session [" + session +
+ "] in " + std::to_string(_childProcesses.size()) + " childs.");
const auto child = findChild(url);
if (child)
diff --git a/loolwsd/LOOLProtocol.cpp b/loolwsd/LOOLProtocol.cpp
index b514636..ab87c22 100644
--- a/loolwsd/LOOLProtocol.cpp
+++ b/loolwsd/LOOLProtocol.cpp
@@ -158,7 +158,9 @@ namespace LOOLProtocol
}
const auto firstLine = getFirstLine(message, length);
- if (firstLine.size() < static_cast<std::string::size_type>(length))
+
+ // If first line is less than the length (minus newline), add eclipes.
+ if (firstLine.size() < static_cast<std::string::size_type>(length) - 1)
{
return std::string('\'' + firstLine + "'...");
}
diff --git a/loolwsd/TileCache.cpp b/loolwsd/TileCache.cpp
index b59e720..988e9c2 100644
--- a/loolwsd/TileCache.cpp
+++ b/loolwsd/TileCache.cpp
@@ -52,19 +52,19 @@ TileCache::TileCache(const std::string& docURL,
_isEditing(false),
_hasUnsavedChanges(false)
{
- Log::info("TileCache ctor.");
+ Log::info("TileCache ctor for uri [" + _docURL + "].");
const bool cleanEverything = (getLastModified() < modifiedTime);
if (cleanEverything)
{
// document changed externally, clean up everything
Util::removeFile(_rootCacheDir, true);
- Log::info("Completely cleared cache: " + _rootCacheDir);
+ Log::info("Completely cleared tilecache: " + _rootCacheDir);
}
else
{
// remove only the Editing cache
Util::removeFile(_editCacheDir, true);
- Log::info("Cleared the editing cache: " + _editCacheDir);
+ Log::info("Cleared the editing tilecache: " + _editCacheDir);
}
File cacheDir(_rootCacheDir);
@@ -75,7 +75,7 @@ TileCache::TileCache(const std::string& docURL,
TileCache::~TileCache()
{
- Log::info("~TileCache dtor.");
+ Log::info("~TileCache dtor for uri [" + _docURL + "].");
}
std::unique_ptr<std::fstream> TileCache::lookupTile(int part, int width, int height, int tilePosX, int tilePosY, int tileWidth, int tileHeight)
More information about the Libreoffice-commits
mailing list