[Libreoffice-commits] online.git: kit/Kit.cpp net/Socket.hpp wsd/LOOLWSD.cpp
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Thu Mar 12 12:24:16 UTC 2020
kit/Kit.cpp | 2 +-
net/Socket.hpp | 26 +++++++++++++++-----------
wsd/LOOLWSD.cpp | 3 +--
3 files changed, 17 insertions(+), 14 deletions(-)
New commits:
commit a0cdafca41f41638214fc0f59006bd7f1e4e67f5
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun Mar 8 14:33:47 2020 -0400
Commit: Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Thu Mar 12 13:23:57 2020 +0100
wsd: some logging improvements
Change-Id: Icf4c4845e10f44fe1518e58ea598c2d1053b40c1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90357
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index 496514e46..8b8e6514d 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -1869,7 +1869,7 @@ public:
const TileQueue::Payload input = _tileQueue->pop();
- LOG_TRC("Kit Recv " << LOOLProtocol::getAbbreviatedMessage(input));
+ LOG_TRC("Kit handling queue message: " << LOOLProtocol::getAbbreviatedMessage(input));
const StringVector tokens = LOOLProtocol::tokenize(input.data(), input.size());
diff --git a/net/Socket.hpp b/net/Socket.hpp
index 99fdf259a..b15aeb21b 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -588,8 +588,8 @@ public:
int rc;
do
{
- LOG_TRC("Poll start");
#if !MOBILEAPP
+ LOG_TRC("Poll start, timeoutMs: " << timeoutMaxMs);
rc = ::poll(&_pollFds[0], size + 1, std::max(timeoutMaxMs,0));
#else
LOG_TRC("SocketPoll Poll");
@@ -1106,12 +1106,14 @@ protected:
// Always try to read.
closed = !readIncomingData() || closed;
+ LOG_TRC("#" << getFD() << ": Incoming data buffer " << _inBuffer.size() <<
+ " bytes, closeSocket? " << closed);
+
+#ifdef LOG_SOCKET_DATA
auto& log = Log::logger();
- if (log.trace()) {
- LOG_TRC("#" << getFD() << ": Incoming data buffer " << _inBuffer.size() <<
- " bytes, closeSocket? " << closed);
- // log.dump("", &_inBuffer[0], _inBuffer.size());
- }
+ if (log.trace() && _inBuffer.size() > 0)
+ log.dump("", &_inBuffer[0], _inBuffer.size());
+#endif
// If we have data, allow the app to consume.
size_t oldSize = 0;
@@ -1174,12 +1176,14 @@ public:
len = writeData(&_outBuffer[0], std::min((int)_outBuffer.size(),
getSendBufferSize()));
+ LOG_TRC("#" << getFD() << ": Wrote outgoing data " << len << " bytes of "
+ << _outBuffer.size() << " bytes buffered.");
+
+#ifdef LOG_SOCKET_DATA
auto& log = Log::logger();
- if (log.trace() && len > 0) {
- LOG_TRC("#" << getFD() << ": Wrote outgoing data " << len <<
- " bytes of " << _outBuffer.size() << " bytes buffered.");
- // log.dump("", &_outBuffer[0], len);
- }
+ if (log.trace() && len > 0)
+ log.dump("", &_outBuffer[0], len);
+#endif
if (len <= 0 && errno != EAGAIN && errno != EWOULDBLOCK)
LOG_SYS("#" << getFD() << ": Socket write returned " << len);
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 2a59b961c..a06687788 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -3654,12 +3654,11 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
UnitWSD::get().returnValue(returnValue);
- LOG_INF("Process [loolwsd] finished.");
-
#if MOBILEAPP
fakeSocketDumpState();
#endif
+ LOG_INF("Process [loolwsd] finished.");
return returnValue;
}
More information about the Libreoffice-commits
mailing list